Jak otrzymać okno
window.addEventListener("message", () => {
this.receiveMessage();
}, false)
Frail Falcon
window.addEventListener("message", () => {
this.receiveMessage();
}, false)
constructor(private _authService: AuthService, private _router: Router) {
if (window.addEventListener) {
window.addEventListener("message", this.receiveMessage.bind(this), false);
} else {
(<any>window).attachEvent("onmessage", this.receiveMessage.bind(this));
}
}
receiveMessage: any = (event: any) => {
//...
}