Sreekanth ReddyRank #726 · 3.2K reputationPosted Jan 22, 2019, 12:55 AM EST
0
Hi Saravanan,
Pipes are used to format the data.
Formatting the data means :
Let us think that we got the data of gender as 0 and 1 from backend/via service.
But the user wants to see it as 0 as "Male" and 1 as "Female".
So, in this situations we choose PIPES in angular2+ versions.
Another example:
If the end user want to see true as "Yes" and false as "No". This is also formatting.
Another way of formatting :
Increment the salary of employees with 5000 and display.
So all the above are the scenarios of formatting the data.
In that situations we have to choose the custom "PIPES" concept.
We are also having built in pipes like currency,date,upper case,lower case... & so on.
For more about PIPES :
https://angular.io/guide/pipes
Accept the answer, If it helps.
Thank you.
0
Puneet KankarRank #446 · 5.6K reputationPosted Jan 22, 2019, 1:20 AM EST
0
Pipe is use for transform data based onrequirement by using | symbol like.
Lowercasepipe
Uppercasepipe
Datepipe
Currencypipe
Jsonpipe
Percentpipe
Decimalpipe
Slicepipe
0
Jignesh KumarRank #91 · 22.9K reputationPosted Jan 22, 2019, 3:11 AM EST
Sanwar RanwaRank #23 · 44.7K reputationPosted Jan 22, 2019, 12:48 AM EST
Sreekanth ReddyRank #726 · 3.2K reputationPosted Jan 22, 2019, 12:55 AM EST
Puneet KankarRank #446 · 5.6K reputationPosted Jan 22, 2019, 1:20 AM EST
Jignesh KumarRank #91 · 22.9K reputationPosted Jan 22, 2019, 3:11 AM EST
Salman BegRank #284 · 8.8K reputationPosted Jan 22, 2019, 4:25 AM EST
Rajeesh MenothRank #118 · 18.4K reputationPosted Jan 22, 2019, 7:27 PM EST
Munesh SharmaRank #174 · 13.9K reputationPosted Feb 1, 2019, 1:53 AM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts