Angular · Middle · Question 44 of 75
What is the difference between pure and impure pipes?
- ✓Correct answer: A pure pipe re-runs only when its input reference or arguments change; an impure pipe runs on every change detection
- 2Pure pipes can't take arguments
- 3Impure pipes run only on the server
Explanation
Pipes are pure by default, which makes them cheap. pure: false is needed when the output depends on internal mutations (like async), but it is costly when the work is heavy.