Hi,
I want the default to show as $0 total, 
at the moment it shows as -0.20

Do you know how to fix this please? 

 
</head>
<body ng-app ng-init="amount=0;percentage1=0;percentage2=0">
  <div>
    Amount<input ng-model="amount">

    <div>Percentage 1
      <select  ng-model="percentage1">
<option value="0">0</option>
          <option value="5" ng-selected>5%</option>
          <option value="10">10%</option>
      </select>
    </div>

    <div>
      Percentage 2
      <select   ng-model="percentage2">
<option value="0">0</option>
          <option value="12">12%</option>
          <option value="20">21%</option>
      </select>
    </div>
    <div>
      <b>Total = {{amount - (amount / 100 * percentage1)   - 0.20 
-  (amount/100 * percentage2) }} $</b>
  </div>
 
</body>
</html>

Thanks for your help! :)

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to