The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

424821 (1) [Avatar] Offline
#1
Hi,


I'm asking myself (plus spending hours on internet research) if there is a 'best practice' for using formatted numbers in Angular.

I'm building a huge finance application. Lots of pages with lots of numbers. For simplicity I declare all the input fields as type="number". This
enables me to do all the calculations.

At the beginning of the development I started with input type text to be able to format the numbers with decimal and thousand separators.
But this leads me to huge problems in using these strings in calculations. I first had to unformat them, before I could calculate with them.

Now with using number type, calculation is easy, but customer wants to formatted numbers. What is the best way of dealing with this dilemma?

Cheers and thanks for your advices
Klaus