Is it possible in Angular typescript to detect the close event of a popup window and then refresh the parent window?
I attempted to achieve this by including the following script in the component that will be loaded onto the popup window, but unfortunately, it did not trigger the desired event.
@HostListener('window:beforeunload', ['$event'])
public beforeunloadHandler($event) {
console.log("foo");
window.opener.reload();
window.close();
}