Tutorial-6 Pipes
Pipes We describe Angular Pipes as it provides a way to format the Data in your html template, without putting a lot of efforts in your program for displaying some data in some specific format angular gives us power of Pipes. Pipes can be used within the Interpolation Expression for showing the formatted output. We use Pipe Operator i:e : I for availing the pipe facility, followed by the required pipe name. Syntax : {{dataModel | pipe name}} Ex : <p>Date of joining is{{joinDate | date}}</p> Parameterized Pipe: Pipes can take further formatting options with the help of parameters, parameters are represented by : (Colon) and placed after the pipe names. Syntax: {{dataModel | pipe name:parameter}} Ex : <p>Date of joining is{{joinDate | date:”MM/dd/YYYY”}}</p> Demonstrating uppercase and lowercase pipes App.cpmponent.ts import { Component } from '@angular/core' ; import { FormsModule } from '@angular/forms' ; ...