<script>
var app = angular.module('foo', []);
app.controller('userCtrl', function ($scope) {
$scope.sum = $scope.range1 + $scope.range2;
});
</script>
<div ng-controller="userCtrl">
<input ng-model="range1" type="range" value="10" />
<input ng-model="range2" type="range" value="10" />
<h1>{{sum}}</h1>
</div>
var app = angular.module('foo', []);
app.controller('userCtrl', function ($scope) {
$scope.one = 10;
$scope.two = 10;
$scope.$watch('one', function(newValue, oldValue) {
summa();
});
$scope.$watch('two', function(newValue, oldValue) {
summa();
});
function summa(){
$scope.sum = parseInt($scope.one) + parseInt($scope.two);
}
});