【发布时间】:2018-06-25 00:37:12
【问题描述】:
oauthLogin(app) {
this.openAuthPopup(
'/assets/auth.html?socialApp=' + app, () => {
if (this.SharedService.getAuthorization()) {
this.checkRegistrationStatus();
this.SharedService.changeLoggedInStatus(true);
this.SharedService.changedisplayName(this.SharedService.getDispalyName());
this.router.navigate(['home/dashboard']);
}
}
);
}
我的弹窗开启代码
openAuthPopup(url, callback) {
window.open(url, '_blank');
callback();
}
我已经创建了这个函数并从 html 调用这个函数。此功能正在打开一个弹出选项卡。我希望在我的弹出选项卡关闭时检查我的 if 条件,但目前正在发生的事情就像在弹出选项卡上的进程期间检查我的 if 条件。 我被困住了。需要帮助。
提前致谢
【问题讨论】:
-
注册一个窗口事件
标签: javascript angular popup angular2-forms