$dialog, modal and location change #335
Description
Created based on angular-ui/angular-ui-OLDREPO#538 from the angular-ui repo:
I have run into an issue with Modals and Dialogs when a browsers back button is pressed while a modal and glassis visible. (in a multi page app).
The application changes the view and controller while the modal stays activated and visible. As the controller has been swapped out from underneath the modal, strange things start happening.
How do we get around this issue? Is there a way to make sure the modal / dialog is dismissed when the back button is dismissed or the route is changed.
It is an interesting problem, we should consider closing modals on location change. The thing that the modal stays open while controllers can be sapped underneath sounds like a buggy situation.