I am developing an application in Ionic and use an input form field for my calculations.
<input type="number" ng-model="data" step="0.01">
However if I update the data with the value 100.10 the input box shows 100.1
I want to format the value in the input field so it always shows 2 decimals (100.10).
I have tried using filters, but they only work when I change the input to type "text". I want to use a type="number" because this only shows the numeric keyboard.
I have also tried:
parseFloat(""+data.toFixed(2))
but this also shows 100.1