PublishMessageService.viewPublishMessage(postId).then(function(d){
if(d.data.post) {
$scope.showPost = true;
$scope.post = d.data.post;
$scope.showContentLoading = false;
ShareObjectService.setPostPhotoIds($scope.post.photosIds);
debugger
// $scope.$apply();
} else {
showInlineMessage(Utils.prepareErrorMessage("Nothing Was Found", "Sorry requested content is not available."));
}
}, function(err) {
showInlineMessage(Utils.prepareErrorMessage("Sorry!", err.description));
});
我在这里获取$scope.post
的数据,但它没有反映在模板中。如果我使用$scope.$apply()
我的错误$scope.$apply is not a function
。我不知道为什么突然间我开始遇到这种问题。早些时候工作正常。