Currency Pipe in Typescript

Currency Pipe in Typescript

Currency Pipe will transform a number to a currency value of type string, and format it based on ones locale rules which will decide group sizing and separator, decimal-point character, and other locale specific configurations.

This is one of the built in pipe in Angular used to format currency value according to given country code,currency,decimal,locale information.

Syntax of Currency pipe Angular :

{{ value_expression | currency [ : currencyCode [ : display [ : digitsInfo [ : locale ] ] ] ] }}



price: number = 10050.4521;


{{ price | currency }} //output $10,050.45

Read the Complete Article in Depth here for various Use Cases: Use of Currency Pipe in Angular

πŸ”₯ 9 Views
Aug 29, 2022