更新时间:2023-12-03 07:57:04
当您使用 Angularfire2 时,应该是这样:
When you are using Angularfire2 this should be the way:
constructor(public af: AngularFire) {
this.af.auth.subscribe(auth => {
//Here you get the user information
console.log(auth));
}
}
login() {
this.af.auth.login({
provider: AuthProviders.Facebook,
method: AuthMethods.Popup,
});
}
查看此处了解更多信息:https://angularfire2.com/api/
Take a look here for more information: https://angularfire2.com/api/