Skip to content

Instantly share code, notes, and snippets.

@edygar
Created January 21, 2015 11:07
Show Gist options
  • Save edygar/8dc6034de4ae235d3dd1 to your computer and use it in GitHub Desktop.
Save edygar/8dc6034de4ae235d3dd1 to your computer and use it in GitHub Desktop.
Promise Epiphany
function get(path) {
return user.waitForAuthentication()
.then(function() {
return $http.get(path);
})
.then(function(response){
return resposne data;
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment