I noticed that there is a pipe called CurrencyPipe in Angular 2, which will filter some decimals from a number. This also adds the ISO currency indicator, ie \'USD\' or any othe
The DISPLAY parameter is changed from boolean
to string
display string | boolean
The format for the currency indicator. One of the following:
- code: Show the code (such as USD).
- symbol(default): Show the symbol (such as $).
- symbol-narrow: Use the narrow symbol for locales that have two symbols for their currency. For example, the Canadian dollar CAD has the symbol CA$ and the symbol-narrow $. If the locale has no narrow symbol, uses the standard symbol for the locale.
- String: Use the given string value instead of a code or a symbol. For example, an empty string will suppress the currency & symbol.
Boolean (marked deprecated in v5): true for symbol and false for code.
Optional. Default is 'symbol'.
Docs: https://angular.io/api/common/CurrencyPipe
You can overwrite the currency & symbol with the string format.
String: Use the given string value instead of a code or a symbol. For example, an empty string will suppress the currency & symbol.
{{ product.price | currency:'USD ' }}