Vitor Vitor - 21 days ago 5
AngularJS Question

AngularJS dot to comma

I'm new angularjs student, and my program receive a .json file with prices, but they are all with dots, i want to create a directive or something to substitute dots to comma's.

Can anyone help me please?

Thanks!

Answer

What you probably want to do is format your prices through the currency filter, which will work with a comma if you install the correct localization files. You can see an example of german localization at Angular Currency Formatter with Comma