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!
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.
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.
Answer: B) DataPipe Is not built-in a pipe 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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With