Question - What are pipes?
Answer -
A pipe takes in data as input and transforms it to a desired output. For example, let us take a pipe to transform a component's birthday property into a human-friendly date using date pipe.
import { Component } from '@angular/core';
@Component({
selector: 'app-birthday',
template: `
Birthday is {{ birthday | date }}
`
})
export class BirthdayComponent {
birthday = new Date(1987, 6, 18); // June 18, 1987
}