i have got this error …Someone help me to find this error…My code is
import {Auth,User} from '@ionic/cloud-angular';
import { Component } from '@angular/core';
and i have add Auth and user to the components
@Component({
selector: 'page-home',
templateUrl: 'home.html',
providers:[Auth,User],
})
and i added the parameters to the constructors and my code is
this.auth.login('google').then(response=>{
const full_name = this.user.social.google.data.full_name;
const profile_picture = this.user.social.google.data.profile_picture;
const email = this.user.social.google.data.email;
window.localStorage.setItem('CurrentUser',JSON.stringify(response));
//pushing to the next page
this.navCtrl.push(UserPage,{
username: full_name,
userimage : profile_picture,
email : email,
});
}).catch(error=>{
alert("Error Occured..!");
})
})
what i am done wrong.Anyhelp thanks