Skip to content

Instantly share code, notes, and snippets.

@richardj
Created January 15, 2016 10:19
Show Gist options
  • Save richardj/304f8b3ce83cc1c20876 to your computer and use it in GitHub Desktop.
Save richardj/304f8b3ce83cc1c20876 to your computer and use it in GitHub Desktop.
when calling {{ storyDetail }} in my template it will not update (it is initiated earlier as an empty object just for testing sake. The log displays the correct value (object).
this.getStory = function(id) {
storyService.getStory(id)
.then(function(data) {
if (data !== undefined) {
$scope.storyDetail = data;
console.log($scope.storyDetail);
}
else {
console.log("something went wrong with the data");
}
}, function(error) {
$scope.storyDetail = error.status + " " + error.statusText;
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment