Reputation: 194
I have this screen where I my user type a currency value on a Input element. When I save it on my Database, it goes like a text. Ie: 10000.
I am trying to show this value in another screen with a currency mask like $10.000 but I don´t want to use a input field. I am just showing the value inside a <ul>
.
How do I do that with Javascript???
Upvotes: 0
Views: 358
Reputation: 194
Using
.toLocaleString('pt-BR', { style: 'currency', currency: 'BRL' })
did the trick.
Upvotes: 1