Answer the question
In order to leave comments, you need to log in
How can you dynamically calculate the product of the values of two inputs and insert them into the third one?
This is what
index.html comes out with
<div ng-controller="TestCtrl">
<input type="text" ng-model="w"/>
<input type="text" ng-model="h"/>
<input type="text" ng-model="s" />
<p>Площадь = {{s}}</p>
</div>
function TestCtrl($scope){
$scope.w = 2;
$scope.h = 3;
$scope.s = $scope.w+$scope.h;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question