Bird
0
0

Which of the following is the correct syntax to pass a parameter to a pipe named customPipe with parameter 5?

easy📝 Syntax Q12 of 15
Angular - Pipes
Which of the following is the correct syntax to pass a parameter to a pipe named customPipe with parameter 5?
A{{ value | customPipe:5 }}
B{{ value | customPipe(5) }}
C{{ value | customPipe;5 }}
D{{ value | customPipe->5 }}
Step-by-Step Solution
Solution:
  1. Step 1: Recall Angular pipe parameter syntax

    Angular pipes use colon : to separate parameters.
  2. Step 2: Check each option

    Only {{ value | customPipe:5 }} uses colon correctly: | customPipe:5.
  3. Final Answer:

    {{ value | customPipe:5 }} -> Option A
  4. Quick Check:

    Pipe parameters use colon : [OK]
Quick Trick: Use colon : to pass parameters to pipes [OK]
Common Mistakes:
  • Using parentheses instead of colon
  • Using semicolon or arrow instead of colon
  • Omitting the colon

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes