0Pricing
Angular Academy · Lesson

Pure vs Impure Pipes

Understand pipe change detection behavior.

Pure Pipes by Default

Every pipe is pure by default. A pure pipe only re-runs when its input value or arguments change by reference.

Why Pure Pipes Are Fast

Angular skips calling a pure pipe during change detection if the input reference has not changed. This makes pure pipes efficient.

@Pipe({ name: "exclaim", standalone: true })
export class ExclaimPipe implements PipeTransform {
  transform(value: string) { return value + "!"; }
}
// pure: only re-runs when value changes

All lessons in this course

  1. Using Built-in Pipes
  2. Chaining and Parameterizing Pipes
  3. Creating Custom Pipes
  4. Pure vs Impure Pipes
← Back to Angular Academy