Reputation: 1994
I have below expression in AngularJS which displays a number with 2 decimal places.
{{detail.exit | number : 2}}
But when i add currency symbol as below, the number becomes blank on UI for few of the records.
{{detail.exit | number : 2 | currency}}
Anybody faces this issue before ? I i remove the currency symbol the number is getting displayed properly.
Upvotes: 1
Views: 25
Reputation: 25920
this works perfect
{{detail.exit | currency:"USD$":2}}
please replace currency symbol to whatever you want.
Upvotes: 1
Reputation: 1994
Issue resolved by removing the number : 2 from the expression since currency seems to be formatting the number in 2 decimal places internally.
{{detail.exit | currency}}
Upvotes: 0