我正在尝试像在文档中一样使用 nebular oauth,但是在 logincomponent 中,不同的是我扩展了 nebular login 组件。但是这段代码给了我一个错误
export class LoginComponent extends NbLoginComponent implements OnDestroy {
public user: SocialUser;
private loggedIn: boolean;
constructor(service: NbAuthService,options: {},cd: ChangeDetectorRef, router: Router) {
super(service,{},cd, router);
}
alive = true;
login() {
this.service.authenticate('google')
.pipe(takeWhile(() => this.alive))
.subscribe((authResult: NbAuthResult) => {
});
}
ngOnDestroy(): void {
this.alive = false;
}
}
怎么了?
