Lesson 24 / 32

Built-in Pipes

Format dates, currency and text in templates with built-in pipes and chain them together.

date, currency, uppercase

A pipe uses | to transform a value for display, without changing the underlying data.

<p>{{ order.date | date:'mediumDate' }}</p>
<p>{{ order.total | currency:'INR' }}</p>
<p>{{ product.name | uppercase }}</p>

Chaining pipes

Pipes can be chained — each one receives the output of the pipe before it: {{ name | lowercase | titlecase }}.