【发布时间】:2017-04-11 16:39:08
【问题描述】:
当我打开 OAuth 的弹出窗口并通过
返回时window.opener.closeCallbackFunction();
然后我的 ChangeDetection 在转发的页面上不再工作。
function _window(): any {
return window;
}
@Component({
selector: 'app-register',
templateUrl: './register.component.html',
})
export class ConsultantRegisterComponent {
constructor() {
}
openPopup() {
let _this = this;
let selfWindow = _window();
let popup = lib.PopupCenter('/RegisterWithFacebook', 'Sign In', 600, 400);
selfWindow.closeCallbackFunction = function () {
popup.close();
_this.forward.call(_this);
};
}
forward() {
this.router.navigate(['/register-oauth']);
}
}
这是一个错误,还是我做错了什么?
【问题讨论】:
标签: javascript angular angular2-routing prototype-programming