I have an situation on my page.
I have two inputs and an label in my page. These label have to show the sum of these two inputs value.
So I tried below sol
Simple method for this :
Js file:
var myApp = angular.module('myApp', []);
myApp.controller("myCtrl", function ($scope) {
$scope.sum = function (num1, num2) {
$scope.addition = parseInt(num1) + parseInt(num2);
}
});
html file:
Enter First Number:
Enter Second Number:
///.. the textbox in which u want the output just use ng-model there .. as u can see above:..