I have designed a form in angular js with modal popup.Inside modal popup two textboxes and a button.i want to perform subtraction of two numbers.After submitting a button inside modalpopup, the Subtraction result must be shown in textbox which is designed in main form and also next row should be generated automatically with textbox and a button.The problem is after calculation the result is showing same for main form textbox as well as in automatic generated text box. i m attatching code below.can any one solve my problem?
//angular code:
var app = angular.module("myApp", []);
app.controller('myCntrl', function ($scope) {
$scope.rows = [
{
column1: 'first row',
column2: 'second column of first row',
column3: false
}
];
$scope.Addrow = function () {
alert("hi");
$scope.rows.push(
{
column1: 'row #' + $scope.rows.length,
column2: 'this is new',
column3: true
}
);
$scope.result = $scope.val - $scope.value;
//$scope.city = $scope.address;
//$scope.Name = $scope.name;
//var a = Number($scope.val);
//var b = Number($scope.value);
//$scope.sum = a - b;
//var c = $scope.sum;
//$scope.result = c;
}
});
//index.cs html
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
Modal Header
//Layout.cs html
@**@
@**@
@*for modal popup*@

Bikesh SrivastavaRank #108 · 20.3K reputationPosted Oct 19, 2016, 2:25 AM EDT
manikanth mahankali6 reputationPosted Oct 19, 2016, 3:29 AM EDT
manikanth mahankali6 reputationPosted Oct 20, 2016, 4:40 AM EDT