i am using social login plugin.
on app.component.ts ,
goLogin() {
this.stopMenuSlide();
this.menuCtrl.close();
this.kProvider.login().then((res:any) => {
this.serverLogin(res);
});
}
when i do console.log() like this.
goLogin() {
this.stopMenuSlide();
this.menuCtrl.close();
console.log();
this.kProvider.login().then((res:any) => {
this.serverLogin(res);
});
}
i can see console.log on chrome by ionic server.
However, when i do console.log() like this
goLogin() {
this.stopMenuSlide();
this.menuCtrl.close();
this.kProvider.login().then((res:any) => {
console.log();
this.serverLogin(res);
});
}
i cannot see console on chrome.
i check the my provider.ts like this.
constructor(private platform:Platform) {
console.log(“it is KProvider”);
}
i can see this console.log() on Chrome.
i have no idea why this one doesn’t work.
goLogin() {
this.stopMenuSlide();
this.menuCtrl.close();
this.kProvider.login().then((res:any) => {
this.serverLogin(res);
});
}
serverLogin(userprofile) {
let userProfile:any = {};
userProfile.kakaoid = userprofile.id;
userProfile.email = userprofile.email;
userProfile.nickname = userprofile.nickname;
this.userApi.login("auth/login", userProfile).subscribe((res:any) => {
console.log("LOGIN RES", res);
this.storage.set("isLogin", true);
this.storage.set("userProfile", userProfile);
this.userApi.token = res.token;
this.userApi.user = userProfile;
this.showToastWithCloseButton(userProfile.nickname + "success login.");
},
(err:any) => { console.log("LOGIN ERROR", err); });
}
please help me to solve this question.
this is my ionic info.
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.0
Cordova Platforms : android 6.3.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
ios-sim : 6.0.0
Node : v8.5.0
npm : 5.3.0
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Thanks.