Why doesn't this code work? I am assigning a value to the $scope, when the page renders, I see 5 but once the timer fires, the value isn't updated. I am wondering what kind of object the primitive 5 needs to become so that Angular will watch it for changes. Also, if there is a proper way to do this kind of thing it would be nice to know.
app.controller('Total', ['$scope', function($scope) {
$scope.total = 5;
setTimeout(function() {
$scope.total = 1300;
}, 3000);
}
]);