How do I retrieve the total value of all ng-models within an ng-repeat loop using AngularJS? Below is my HTML code:
<div ng-repeat="kind in plans.availableOptions">
<span class="payLabel text-left">{{kind.name}}</span>
<input class="payLabel" type="text" ng-model="kind.number" />
{{priceAll}}<!--priceAll is the sum of the input-->
</div>
Next, here is my controller:
$scope.plans={availableOptions:[{name:'by cash',id:'1'},{name:'by credit',id:'2'}],otherParam:{}}
$scope.priceAll=0;
As a beginner in AngularJS, I am looking for guidance on how to calculate the total sum of the number inputs.