Created
January 15, 2016 10:19
-
-
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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