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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -