Skip to content Skip to sidebar Skip to footer

Angular Js Promise In Service Not Updating View

I am using following code, ======================================= HTML

Solution 1:

It should work when you change:

$scope.event = eventData.getEvent();

to:

eventData.getEvent().then(function(res){
    $scope.event = res;
});

Solution 2:

As of 1.2, Angular templates no longer unwrap promises by default. A temporary solution is to set:

$parseProvider.unwrapPromises(true);

Be careful in using this solution as the documentation seems to hint that future releases might not include this option.

See: Migrating from 1.0 to 1.2 - Templates no longer automatically unwrap promises

Post a Comment for "Angular Js Promise In Service Not Updating View"