Skip to content

Pipes

Pipes are a feature in Angular that allows you to transform data directly in your templates. They take in data, transform it, and output the transformed value — all without modifying the original data.

Pipes keep templates clean by handling data formatting. Instead of writing formatting logic in the component class or cluttering templates with function calls, pipes provide a declarative way to format values.

  • Built-in Pipes: date, currency, uppercase, lowercase, json, async, percent
  • Custom Pipes: creating custom transformation logic
  • Pure vs Impure Pipes: understanding performance implications
  • Pipe chaining: combining multiple pipes
  • Pipe with parameters: passing arguments to pipes

Pipes are a powerful templating feature that keeps your Angular code clean and declarative.”