0

I have a code to create a new user on a opened window. So I want to trigger a even on window.close. Can anyone please help me with this.

My code goes like this

this.authService.postWithoutEncript('callSiteRegUrl', this.sitesData.value, '', true).subscribe(response => {
if (response['status'] === 200) {
const redirectLink = response['msg']; // This link will open on new window
let newwindow = window.open(redirectLink, '_blank', 'toolbar=yes,scrollbars=yes,resizable=yes,top=0,left=0,width=1000,height=600');
} else {
console.log('error message');
}
}, (err: HttpErrorResponse) => {
});

Above code will open a link on new window. How to call a function on closing the opened window?I want to call a function on click of the close button

Karthik
  • 51
  • 7

0 Answers0