I'm trying to setup a progress bar and update it's progress with angular like this
<progressbar value="{{data.progress}}"></progressbar>
The controller code :
myApp.controller( "MainCtrl", [ "$scope", "$timeout", function($scope, $timeout) {
$scope.data = { progress : 0 };
(function progress(){
if($scope.data.progress < 100){
$timeout(function(){
$scope.data.progress += 1;
progress();
},200);
}
})();
}]);
The bar is not updating while the data.progress variable is. It's not even showing ! What's wrong with that design ?