this code shouldn't work — you're modifying the scope object outside of angular's digest cycle, which means angular isn't aware that anything on the scope object has changed, and it won't rerender the page (unless something else is triggering a digest, which is quite possible, and would make this mistake invisible).
this is what angular's $interval service is for, but you should know that anytime you write asynchronous code outside of angular's builtins like $http and $interval that modifies a $scope object, you'll need to invoke $scope.$apply() to let angular know that you made changes that it should reflect. here's a decent article on the topic.
https://github.com/LetsLunch/lunch/blob/development/app/scripts/noshow.js#L18
this code shouldn't work — you're modifying the scope object outside of angular's digest cycle, which means angular isn't aware that anything on the scope object has changed, and it won't rerender the page (unless something else is triggering a digest, which is quite possible, and would make this mistake invisible).
this is what angular's $interval service is for, but you should know that anytime you write asynchronous code outside of angular's builtins like $http and $interval that modifies a $scope object, you'll need to invoke
$scope.$apply()
to let angular know that you made changes that it should reflect. here's a decent article on the topic.