I am new to angularjs, and have been stucked in a problem.... want to display some calculation of two columns of a table in third coluns dynamically...i.e. suppose when user types 10 and 20 in two columns then third column should be dynamically filled as 200(for example).
please suggest me how can I achieve this in angularjs.
I am using ng-repeat to populate simple table in HTML. HTML code is
<table class="table table-hover">
<thead>
<tr>
<th class="col-sm-1" style="text-align:center">S.No.</th>
<th class="col-sm-5" style="text-align:center">Certificate Name</th>
<th class="col-sm-1" style="text-align:center">No of New Certificate</th>
<th class="col-sm-1" style="text-align:center">No of Duplicate Certificate</th>
<th class="col-sm-1" style="text-align:center">Transcript Amount</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="payment in TRAN_PaymentDetail">
<td class="col-sm-1" style="text-align:center">{{$index+1}}
</td>
<td class="col-sm-5">
<input type="text" disabled class="form-control" ng-model="payment.Title" required />
</td>
<td class="col-sm-1">
<input type="number" min="0" name="NewTranscript" class="form-control" ng-model="payment.NoofNewCertificate" />
</td>
<td class="col-sm-1">
<input type="number" min="0" name="NewTranscript" class="form-control" ng-model="payment.NoofDuplicateCertificate" />
</td>
<td class="col-sm-1">
<input type="text" readonly name="NewTranscript" class="form-control" ng-model="payment.HeadAmount" value="{{CalulateHeadAmount()}}" />
</td>
</tr>
</tbody>
</table>
I want to show HeadAmount on the basis of NoofNewCertificate and NoofDuplicateCertificate. As soon as user enters these values HeadAcount should dynamically filled.
Thanks in Advance Regards,