What i'm trying to do is update the percentage value (of data downloaded) which i received from service. I am calling $emit to update the controller and in turn value on $scope
$rootScope.$emit('event:activityWithResults', results);
and in my controller I am doing this
$rootScope.$on('event:activityWithResults', function (event, results){
$scope.percentage = $scope.percentage || {};
$scope.percentage.value = results.percentageComplete + "%";
$log.debug("$scope.percentage:" + JSON.stringify($scope.percentage));
});
I do see in the logs that value on $scope is being updated on interval (I am not calling $emit for every change but regular interval of say 4 or more percentage of data downloaded. In my html I am simply showing this value {{percentage.value}} But this value doesn't update on UI but it updates only once or twice.
What is wrong here?