Recall & Review
beginner
What is pipe chaining in Angular?
Pipe chaining means using multiple pipes one after another in a template expression to transform data step-by-step.
Click to reveal answer
beginner
How do you write pipe chaining in Angular templates?
You write pipes separated by the pipe symbol (|), like: {{ value | pipe1 | pipe2 }}. The output of pipe1 becomes input for pipe2.
Click to reveal answer
intermediate
Why use pipe chaining instead of one complex pipe?
Pipe chaining keeps transformations simple and reusable. Each pipe does one job, making code easier to read and maintain.
Click to reveal answer
beginner
Example: What does {{ 'hello world' | uppercase | slice:0:5 }} output?
It outputs 'HELLO'. First, 'hello world' becomes 'HELLO WORLD' with uppercase pipe, then slice extracts first 5 characters.
Click to reveal answer
intermediate
Can pipes in a chain accept parameters? How?
Yes. Each pipe can have its own parameters after a colon, like {{ value | pipe1:param1 | pipe2:param2:param3 }}.
Click to reveal answer
What symbol is used to chain pipes in Angular templates?
✗ Incorrect
The pipe symbol (|) is used to chain pipes, passing the output of one pipe as input to the next.
In pipe chaining, which pipe runs first?
✗ Incorrect
The first pipe runs first, transforming the original value, then its output goes to the next pipe.
What will {{ 123.456 | number:'1.0-2' | currency }} do?
✗ Incorrect
The number pipe formats decimals first, then currency pipe adds the currency symbol.
Can you chain custom pipes with built-in pipes?
✗ Incorrect
Angular allows chaining any pipes, built-in or custom, as long as they follow pipe rules.
What happens if a pipe in the chain returns null?
✗ Incorrect
The output of each pipe is passed as input to the next, even if it is null.
Explain how pipe chaining works in Angular templates and why it is useful.
Think about how you might prepare food in steps, each step changing the dish a bit.
You got /4 concepts.
Describe how to pass parameters to pipes in a chain and give an example.
Parameters customize how each pipe transforms the data.
You got /3 concepts.