I am using currency pipe in angular2, current I am using
{{price | currency:'USD':true:'1.2-2'}}
which outputs $480,000.00
But The result I want is $480k
, is this possible to achieve?
I am using currency pipe in angular2, current I am using
{{price | currency:'USD':true:'1.2-2'}}
which outputs $480,000.00
But The result I want is $480k
, is this possible to achieve?
You need to write a custom pipe to replace thousands with K. You can still use the currency pipe, but chain it with your custom pipe. You can see the doc here: https://angular.io/docs/ts/latest/guide/pipes.html
I end up creating my own custom pipe