I have an AngularJS application with multiple views (using ng-view). In the app's javascript file, I have intercepted the window's OnBeforeUnload event to make sure the user does not leave the site without saving his work. However, I have noticed that the OnBeforeUnload event gets fired at weird times in IE9 (e.g., when the Angular view changes, or when the view is refreshed).
Basically, OnBeforeUnload is firing when it shouldn't be.
So far, I have worked around the problem by setting and clearing flags in the the routeChangeStart and routeChangeSuccess events, but there always seems to be another gotcha.
Has anyone else seen this problem?
Thanks in advance....