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
This isn't possible since the CurrencyPipe
relies on Intl.NumberFormat
and there is no options for this.
That said you can switch to display $
instead of USD
with the symbolDisplay
parameter set to true
:
{{ product.price | currency:'USD':true }}
This will display: $123
which is a bit better ;-) If this doesn't suit you, you need to implement a custom pipe to format your number...
See these links for more details: