Overview - Pure vs impure pipes
What is it?
In Angular, pipes are simple functions that transform data in templates. Pure pipes run only when their input changes, making them efficient. Impure pipes run on every change detection cycle, even if inputs stay the same. This difference affects performance and when updates appear in the UI.
Why it matters
Without understanding pure and impure pipes, apps can become slow or show outdated data. Pure pipes help keep apps fast by avoiding unnecessary work. Impure pipes allow updates when inputs are complex or change internally. Knowing when to use each keeps apps responsive and efficient.
Where it fits
Before this, learners should know Angular templates and basic pipes. After this, they can learn about custom pipes, change detection, and performance optimization in Angular.