0
0
Angularframework~10 mins

Why pipes are needed in Angular - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to use a pipe that formats a date in Angular.

Angular
<p>{{ today [1] date:'shortDate' }}</p>
Drag options to blanks, or click blank then click option'
A|
B:
C.
D#
Attempts:
3 left
💡 Hint
Common Mistakes
Using ':' instead of '|' to apply a pipe.
2fill in blank
medium

Complete the code to transform a string to uppercase using a pipe.

Angular
<p>{{ name [1] uppercase }}</p>
Drag options to blanks, or click blank then click option'
A|
B#
C.
D:
Attempts:
3 left
💡 Hint
Common Mistakes
Using ':' or '.' instead of '|' for pipes.
3fill in blank
hard

Fix the error in the code to correctly format a number with a pipe.

Angular
<p>{{ amount [1] currency }}</p>
Drag options to blanks, or click blank then click option'
A:
B#
C.
D|
Attempts:
3 left
💡 Hint
Common Mistakes
Using ':' instead of '|' causes syntax errors.
4fill in blank
hard

Complete the code to create a pipe that formats a number as a percent with two decimals.

Angular
<p>{{ value [1] percent : '1.2-2' }}</p>
Drag options to blanks, or click blank then click option'
A|
B:
C,
D.
Attempts:
3 left
💡 Hint
Common Mistakes
Using ',' or '.' instead of ':' for pipe parameters.
5fill in blank
hard

Complete the code to chain pipes that first uppercase a string and then slice it.

Angular
<p>{{ text [1] uppercase  | slice: 0:5 }}</p>
Drag options to blanks, or click blank then click option'
A|
B:
D,
Attempts:
3 left
💡 Hint
Common Mistakes
Missing pipe symbol between pipes or wrong parameter separator.