How to get value of $scope.googleData


#1
$scope.googleLogin = function(){
    $ionicLoading.show({template: 'Loading...'}); 
    /*
     * Google login. This requires an API key if the platform is "IOS".
     * Example: $cordovaGooglePlus.login('yourApiKey')
    */
    window.plugins.googleplus.login(
    {
       // optional space-separated list of scopes, the default is sufficient for login and basic profile info
      'offline': true, // optional and required for Android only - if set to true the plugin will also return the OAuth access token, that can be used to sign in to some third party services that don't accept a Cross-client identity token (ex. Firebase)
      //'webApiKey': 'api of web app', // optional API key of your Web application from Credentials settings of your project - if you set it the returned idToken will allow sign in to services like Azure Mobile Services
      // there is no API key for Android; you app is wired to the Google+ API by listing your package name in the google dev console and signing your apk (which you have done in chapter 4)
    },
    function (obj) {
      //alert(JSON.stringify(obj));
       // do something useful instead of alerting
       $scope.googleData = JSON.stringify(obj, null, 4);      
    $ionicLoading.hide();
    console.log($scope.googleData.gender);
    //$scope.data=$scope.googleData;
    },
    function (msg) {
      alert('error: ' + msg);
      $ionicLoading.hide();
    }
);

i have googleLogin function.
googleData={
“name”:“dev”,
“email”: "dev@abc.com"
}
when i use {{ googleData }}. it display all data.
when i use {{googleData.email}} it display nothing.
it says undefine if i do console.log($scope.googleData.email).


#2

maybe {{googleData.email}} instead of {{google.email}}


#3

sorry it was googleData.email.