Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 2 - List of built-in pipes and their parameters?

Tags:

angular

I'm currently learning the awesome Angular 2 framework and came across some cool pipes and transformations using pipe parameters. For example:

<td>{{product.price| currency:'USD':true:'1.2-2'}}</td>

Could you guys let me know if there's a list of built-in pipes available anywhere on the internet? It would be cool to look through all the stuff I can do, listed with description.

Thanks!

like image 998
Sunny Bharadwaj Avatar asked Apr 08 '16 01:04

Sunny Bharadwaj


People also ask

Which are the built-in pipe in Angular?

The following are commonly used built-in pipes for data formatting: DatePipe : Formats a date value according to locale rules. UpperCasePipe : Transforms text to all upper case. LowerCasePipe : Transforms text to all lower case.

How many categories of pipes are available in Angular 2?

However, these are two types. 1) Pure Pipes : this is only called when angular detects a change in the value or parameters passed to a pipe or works only when the component is loaded. pure pipe work with only one instance of the pipe. By default a pipe is pure pipe.

Which one is not a built-in pipe in Angular 2?

Answer: B) DataPipe Is not built-in a pipe in angular.

How many pipes are there in Angular?

The last yet important thing I want to mention is that there are two types of pipes in Angular, pure and impure pipes. A pure pipe (the default) is only called when Angular detects a change in the value or the parameters passed to a pipe.


1 Answers

You could have a look on the angular.io website in the "api preview" section: https://angular.io/docs/ts/latest/api/.

Just enter "pipe" in the search area and you will have all the available pipes under the "angular2/common" package.

like image 171
Thierry Templier Avatar answered Oct 09 '22 02:10

Thierry Templier