| # 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