Angular / Angular basics
Explain pipes in Angular.
Angular pipes is a way to write display-value transformations that you can declare in your HTML.
A pipe takes in data as input and transforms it into the desired output. In the below example, pipe transforms a component's birthday property into a human-friendly date.
import { Component } from '@angular/core'; @Component({ selector: 'app-birthday', template: `<p>The User's birthday is {{ birthday | date }}</p>` }) export class UserBirthdayComponent { birthday = new Date(1981, 3, 15); }
More Related questions...