0

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?

Mush-A
  • 435
  • 3
  • 11

2 Answers2

1

may you can use ngx-page-visibility, I am not sure if it will serve exactly your needs, check it first

salhi
  • 9
  • 2
0

Hi my friend try this it will help you for you open it

Manoj Prasanna
  • 156
  • 1
  • 10