3
I have to present monetary values in my view, but it is appearing without formatting. For example, 5.4237
should be presented as R$ 5,42
, but I don’t know how to format this value using the Jade with Node.js.
I need the value to be saved in the system as a pure number, without formatting, as this number is used in calculations that would lose accuracy if saved only with two decimal places. However, to show the value on the screen I do not need the other decimals, so I believe that the best way is to format the value when showing it to the user.
How do I format these monetary values in jade?
It is. I’m adding Accounting to the template context and calling the formatting method inside the view, but I wanted a more "native" way to do this. If you don’t have it, you can use it anyway.
– Ulysses Alves
It is. It doesn’t. Jade is more an HTML template than a complete graphic suite.
– Leonel Sanches da Silva
It worked. Thanks for the reply.
– Ulysses Alves