Can I remove .00 if there are no cents in the amount using angular's currency filter? -


budget:number=50000; {{budget | currency:'usd':true}} 

the above code displays budget this

$50,000.00 

but want display this

$50,000 

from currency pipe docs third option uses same format decimal pipe :digitinfo

so can use:

{{budget | currency:'usd':true:"1.0"}} 

plunker example

edit: jota.toledo pointed out could display cents if they're available with

{{budget | currency:'usd':true:"1.0-2"}} 

Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -