I am trying to do the following:
angular.module("controllers", [])
.controller("FooController", function($scope) {
$scope.foo = {};
$scope.foo['bar'] = 0;
setInterval(function(){
$scope.foo['bar']++;
}, 100);
} );
And then, I display the value of foo.bar in my view using
<div> {{ foo.bar }} </div>
The initial value is displayed correctly, but it is never updated. The callback within setInterval is called correctly and the value of bar is updated in javascript.
How can I programmatically "push" my data into the model? (in my real app I'll be pushing data from the server via websockets / atmosphere)