John Higgins John Higgins - 1 month ago 7x
AngularJS Question

Totalling Calculated fields with AngularJS

I have the following AngularJS code and I want to be able to total the calculated fields that appear in the results1 and results2 disabled inputs. Can someone advise how this is done?



<html ng-app>
<script src=""></script>

<script type="text/javascript">



<form name="form" action="index.php" method="post" autocomplete="off">

<input type="text" name="field1" ng-model="field1" ng-init="field1='10'">

<input type="text" name="field2" ng-model="field2" ng-init="field2='10'">


<input type="text" name="results1" value="{{(+field1*100|currency)}}" disabled>

<input type="text" name="results2" value="{{(+field2*100|currency)}}" disabled>





Can you try like this ?