0 votes
in Angular by

How do you chain pipes?

1 Answer

0 votes
by
You can chain pipes together in potentially useful combinations as per the needs. Let's take a birthday property which uses date pipe(along with parameter) and uppercase pipes as below

import { Component } from '@angular/core';

        @Component({

          selector: 'app-birthday',

          template: `<p>Birthday is {{  birthday | date:'fullDate' | uppercase}} </p>` // THURSDAY, JUNE 18, 1987

        })

        export class BirthdayComponent {

          birthday = new Date(1987, 6, 18);

        }
...