Using Built-in Pipes
Format dates, numbers, and text with pipes.
What Is a Pipe?
A pipe transforms data directly in your template for display. You write a value, the pipe character |, then the pipe name.
Pipes are great for formatting dates, numbers, currency, and text without writing extra component logic.
The Pipe Syntax
The basic form is {{ value | pipeName }}. Angular passes the value into the pipe and renders the transformed result.
<!-- template -->
<p>{{ "hello" | uppercase }}</p>
<!-- renders: HELLO -->All lessons in this course
- Using Built-in Pipes
- Chaining and Parameterizing Pipes
- Creating Custom Pipes
- Pure vs Impure Pipes