I want to format using currency filter in AngularJS like the following:
Rp 2.000,00
(using dot as thousand separator, and comma as decimal separator) Currently I am using:
{{product.originalPrice | currency:"Rp "}}
The result:
Rp 2,000.00
Which is not common in our country. How to do it? Thank you.
Angular has full support of i18n and l10n.
To do what you want you have to include angular-locale_id-id.js and then format will be just as you need.
For your locale angular's number format is:
"NUMBER_FORMATS": {
"CURRENCY_SYM": "Rp",
"DECIMAL_SEP": ",",
"GROUP_SEP": "."
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With