我正在使用Angular 4和angularfire2(firebase)的项目,我试图导航到用户成功登录后使用第三方(Google或Facebook)。Angular 4和angularfire2路由器导航,但前面的组件仍然显示
问题是在用户使用angularfire2弹出窗口路由器正确导航(浏览器中的链接变化和家庭组件可见)后,但登录组件仍然存在!
我不确定问题是否与angularfire2登录popoups或角4本身有什么建议?
angularfire2回调:
signInWithGoogle() {
this.angularFireAuth.auth.signInWithPopup(new
firebase.auth.GoogleAuthProvider()).then((infos) => {
this.router.navigate['/home'];
});
}
路由器配置:
const memberSpaceRoutes: Routes = [
{ path: 'sign-in', component: SignInComponent },
{ path: 'home', component: Home},
]
没有想法的家伙? –
登录后浏览器中的网址 –