angular2 pipes

Why use Angular 2 Pipes?

Sometimes, the data is not displays in the correct format on the template that time where using pipes.

You also can execute a function in the template to get its returned value.

Stayed Informed What is Pipes?

For example as,

This pipe is used built-in pipe for displays data in the correct format on templates.

For Built-in Pipe-
1.      DatePipe,
2.      UpperCasePipe,
3.      LowerCasePipe,
4.      CurrencyPipe,
5.      PercentPipe,
6.      JsonPipe,
7.      AsyncPipe,
8.      And so on..

For Custom Pipe-


If you want to display the bank card number on your account detail templates that how to displays this card number?  I think you should display the last four digits and rest of all digits will display as encrypted like (****-****-****_and your card numbers) that time you will need to create a custom pipe to achieve this.
I hope you are enjoying with this post! Please share with you friends. Thank you!!
ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

www.code-sample.com/. Powered by Blogger.
^