Overview
A Pipe is a filter applied over a angular expression. This is denoted by the (pipe symbol)Example Code<!-- Sep 1, 2015 --> <p>{{date | date:'mediumDate'}}</p> <!-- September 1, 2015 --> <p>{{date | date:'yMMMMd'}}</p> <!-- 3:50 pm --> <p>{{date | date:'shortTime'}}</p> Currency
class CurrencyPipe { transform(value: any, currencyCode?: string, symbolDisplay?: boolean, digits?: string) : string } Date
class DatePipe { transform(value: any, pattern?: string) : string supports(obj: any) : boolean } |
Uppercase
Json
Transforms any input value using JSON.stringify. Useful for debugging. lowercase
async
The async pipe subscribes to an Observable or Promise and returns the latest value it has emitted. When a new value is emitted, the async pipe marks the component to be checked for changes. decimal
minIntegerDigits is the minimum number of integer digits to use. Defaults to 1. minFractionDigits is the minimum number of digits after fraction. Defaults to 0. maxFractionDigits is the maximum number of digits after fraction. Defaults to 3. percent
|
Custom Pipes
Using non standard pipes
|
Cheatography
https://cheatography.com
Angular2 Pipes Cheat Sheet by Nathane2005
Angular 2 Pipes
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
More Cheat Sheets by Nathane2005