Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
6
Reply
How to get the result of adding two number in third text box
Monica Priyadharshini
Nov 13 2017 1:31 AM
170
Reply
It is not at al giving the result. Help me to find where I was wrong
View:
@{
ViewBag.Title = "Home Page";
}
<script src="scripts/angular.min.js"></script>
<script src="~/Scripts/AngularJsDemo.js"></script>
<div ng-app="MyFinancialsApp">
<div ng-controller="MyController">
<div >
GrossWanges: <input ng-model="a" type="text" ng-change="UpdateVal()"/>
</div>
<div>
OverTime : <input ng-model="b" type="text" ng-change="UpdateVal()" />
</div>
<div>
ChildSupport : <input ng-model="c" type="text" ng-change="UpdateVal()" />
</div>
<div style="float:right">
<p>Total : {{a--b--c}}</p>
</div>
</div>
</div>
AngularJs:
var FinancialsApp = angular.module("MyFinancialsApp", [])
.controller("MyController",function($scope)){
$scope.UpdateVal=function(){
$scope.TotalVaue=($scope.a)+($scope.b)+($scope.c);
}
});
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
Explain the purpose of reflect-metadata in angular.
Get data of 4 dropdownlists from server in 1 request.