AngularJS client side function? -
i have 2 ng-models form input fields. later in form, display total numeric value of 2 models:
{{field1--field2}}
this adds 2 fields. i'd capture result , use in couple of other places. best way in angular without using js file?
this misuse (or underuse) of angular. angular platform mvvm-style apps, , without backing js - define model , viewmodel - next useless.
nevertheless, define variable on scope within view, so:
<input ng-model="field1" ng-change="sum = field1 -- field2"> <input ng-model="field2" ng-change="sum = field1 -- field2"> {{sum}}
Comments
Post a Comment