I would like
{{user.EMAIL}}
to show up as my email in my account.html view.
Right now my splash controller gets the information from google oAuth and that all works fine.
In my service I do:
.factory('UserService', function($http) {
var user = {
EMAIL: false,
FULLNAME : false,
FIRSTNAME : false,
LASTNAME : false,
PICURL: false,
GENDER: false
}
user.getInfo = function(token) {
$http.get('https://www.googleapis.com/oauth2/v2/userinfo?alt=json&access_token=' + token).
success(function(response){
user.EMAIL = JSON.stringify(response.email);
user.FULLNAME = JSON.stringify(response.fullname);
user.FIRSTNAME = JSON.stringify(response.given_name);
user.LASTNAME = JSON.stringify(response.family_name);
user.GENDER = JSON.stringify(response.gender);
alert(user.EMAIL);
}).
error(function(){
alert("Error!");
})
}
return user;
my controller has the service as a dependency so I can't imagine why it's not displaying in my account.html view. The alert(user.EMAIL) works fine too.