Answer the question
In order to leave comments, you need to log in
How to count decimals in Angular?
You need to calculate the amount and at the same time calculate it including VAT (16% and 18%), i.e. multiply it by 0.18 or by 0.16.
So far, it turns out to multiply only by an integer, but not by a fractional one. In this case, it is multiplied by 16, but not by 0.18:
codepen.io/rinatoptimus/pen/wadWqV
1) How to multiply by 0.18?
2) How to remove NaN in the place where the result appears?
Answer the question
In order to leave comments, you need to log in
Use not parseInt, but parseFloat in
codepen.io/anon/pen/qdmNoo filter
Excuse me, but could you tell me about the second point in the question?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question