angularjs - Angular Currency Formatter with Comma -
i using following syntax format euro amount in angular
{{ 20,00 | currency : "€" : 2}}
what produces
"20.00€"
is there simple way format (using syntax) euro price comma instead of dot. like
"20,00€"
?
for localisation angular leverages i18n localization , gloablization of applications. using euro symbol not give formatting of comma vs. period.
https://docs.angularjs.org/guide/i18n
you'll need include formatting including correct i18n script in project. here's example angular if application needs german formatting.
<html ng-app> <head> …. <script src="angular.js"></script> <script src="i18n/angular-locale_de-de.js"></script> …. </head> </html>
if need format currency based upon symbol currency though, you'll need implement custom filter.
Comments
Post a Comment