currently when the user leaves the page I use the beforeunload
event to show the default browser popup.
But I don't want this popup when the user navigates to another page or so on. I have a canDeactivate
guard with a custom popup and a custom confirmation message to do that.
I want the default browser popup only when the user tries to close the browser/tab.
How can I do this?
may you can use ngx-page-visibility, I am not sure if it will serve exactly your needs, check it first