O'Reilly logo

Learning Angular for .NET Developers by Rajesh Gunasundaram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Currency pipes

Currency pipes format the number to the required currency format that is provided. This is the syntax for a currency pipe:

expression | currency[:currencyCode[:symbolDisplay[:digitInfo]]] 

The expression is the input data for a pipe; currency is the keyword of the pipe, and it takes three arguments, namely currencyCode, which takes values such as USD, INR, GBP, and EUR, symbolDisplay, which accepts true or false to show/hide the currency symbol, and digitInfo, which takes the decimal format for the currency. The following template demonstrates how to use the currency pipe:

The template that implements a currency pipe

The output ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required