Reputation: 139
Having a problem not being able to show a number like this 40.70, It's showing as 40.7
I tried adding {{number:2}} to different places but just can't get it to work. Any help is greatly appreciated.
this is my current html code:
<td style="width: 10px;">
<div class="currency-input">
<span class="currency-symbol">$</span>
<input type="number" step="0.01" min="0.00" class="currency" ng-model="item.UnitPrice" ng-change="updateQuoteTotals(); formatDecimals(this)" class="form-control text-center input-sm" style="width: 90px; border: 1px solid #CCCCCC; height: 25px;" readonly>z
</div>
</td>
I know I have to add {{number:2}} somewhere in there just don't know where.
Upvotes: 1
Views: 218
Reputation: 4611
Try like this it should vork
<input type="text" ng-model="val | number:2">
Upvotes: 1