0

I have ng-repeat on a table row <tr> in which a td are filled out by ng-repeat. one of the <td> i have to make a simple calculation like that:

 <td>{{ (total.drawerAmount + total.totalReturns ) - total.totalWithd }}</td>

this returns 0.0005000000019208528 while it should return 0, meanwhile it works fine when i make it in this form:

<td>{{ total.drawerAmount + total.totalReturn }}</td>

please can someone explain why it works when i only put two variable and it go wrong when i put three variable in the calculation? Thanks in advance

sabithpocker
  • 14,744
  • 1
  • 38
  • 71
Ali Al Amine
  • 1,378
  • 2
  • 29
  • 47

0 Answers0