Last active
May 22, 2016 11:36
-
-
Save nehalist/d233c6859c4cb6d33caa3625b505a4e1 to your computer and use it in GitHub Desktop.
This file contains 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
# service | |
@app.factory 'CurrentUser', ($http) -> | |
$http({ | |
method: 'GET', | |
url: 'users/me' | |
}).then (user) => | |
# i want to return the user object | |
return # ... what? | |
# favored usage | |
console.log CurrentUser.name, CurrentUser.mail, ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment