Last active
August 29, 2015 13:56
-
-
Save ThorstenHans/9134848 to your computer and use it in GitHub Desktop.
ShareCoffee.UserProfiles
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
window.MyAngularApp.service 'userProfilesService', ['$http', ($http) -> | |
loadMyProfile: (onSuccess, onError) -> | |
$http ShareCoffee.REST.build.read.for.angularJS | |
url: ShareCoffee.Url.GetMyProperties | |
.success onSuccess | |
.error onError | |
loadProfilePropertiesForUser: (accountName, onSuccess, onError) -> | |
properties = new ShareCoffee.UserProfileProperties(ShareCoffee.Url.GetUserProfileProperty, accountName, 'WorkEmail') | |
$http ShareCoffee.REST.build.read.for.angularJS | |
properties | |
.success onSuccess | |
.error onError | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment