Skip to content

Instantly share code, notes, and snippets.

@mohuk
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohuk/693bc7db847bfdc7549d to your computer and use it in GitHub Desktop.
Save mohuk/693bc7db847bfdc7549d to your computer and use it in GitHub Desktop.
userProfileController
(function(){
'use strict';
angular.module('app.dashboard')
.controller('userProfile', userProfile);
userProfile.$inject = ['dataservice'];
function userProfile(dataservice){
var userProfile = this;
userProfile.name = "";
userProfile.age = "";
userProfile.email = "";
init();
//////////
function init(){
dataservice.getUserProfile().then(success);
function success(response){
userProfile.name = response.Name;
userProfile.age = response.Age;
userProfile.email = response.Email;
}
}
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment