The UI binds but with {{total}} showing as -1 I do see the console log 'data came back'. Why dont I see 99 ?
myModule.controller('dashboardCtrl', ['$scope', '$http'
, function ($scope, $http) {
$scope.total=-1;
$http.get('api/controlPanel/dashboard').success(function (data) {
$scope = data.stats;
$scope.total=99; // just to make sure the value changes
console.log('data came back');
});
}
]);
I read a lot of blogs talking about $scope.$apply yet it is undefined. Any help would be appreciated