Angularjs has built some commonly used filter, we hit look.
Currencyfilter (currency):
Purpose: Format currency
Method Prototypes:
function (amount, currencysymbol, fractionsize)
1 {{| currency}} <!--12 formatted as currency, default unit symbol is ' $ ', decimal default 2 bit-->2 3 {{12.45 | currency: ' ¥ '}} <!--formats 12.45 as currency, using a custom Unit symbol is ' ¥ ', decimal default 2 bit-->4 5 {{12.45 | currency: ' Chy¥ ': 1}} <!--convert 12.45 to currency, use custom unit symbol for ' Chy¥ ', decimal specifies 1 bit, rounding operation is performed-->6 7 {{12.55 | currency:undefined:0}} <!--format 12.55 as currency without changing the unit symbol, and the decimal part will be rounded--
Original address: http://www.codeceo.com/article/angularjs-filter-usage.html
AngularJS filter Usage Detailed "Go + actual test" formatted currency