Update Angular ng-model view JS setTimeout
Hi,
I need to update my input using some interval. So I'm using following code:
HTML
<div ng-app="myapp">
<div ng-controller="MyCtrl">
<input type="text" ng-model="testVal" />
</div>
</div>
and JS:
var app = angular.module('test', []);
app.controller('MyCtrl', function ($scope) {
$scope.testVal = 0;
setInterval(function() {
$scope.testVal++;
}, 1000);
});
When I'm deb