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"}}
edit: jota.toledo pointed out could display cents if they're available with
{{budget | currency:'usd':true:"1.0-2"}}
Comments
Post a Comment