Prathaban Durai

Prathaban Durai

  • NA
  • 31
  • 10.9k

How to handle page unload in angular?

Jul 19 2016 3:50 AM
Hi all,
           My issue is window.onbeforeunload is triggering twice and so dialog window is shown twice which should not happen. i have tried all possible ways to prevent that event to fire but nothing is working. so planned to handle the navigation using angular. Is there any way to handle the page unload in angular ?  
 
I have tried using $destroy, but its not working..
 
 
Thanks in advance 

Answers (2)