Reliably determine if angular-ui modal is open or closed (shown or hidden)

Viewed 7762

I'm looking for a method to reliably determine if the angular-ui modal window is currently open or closed.

The standard Bootstrap JS provides the 'shown' / 'hidden' events for this.

Right now I can only wrap the modal.close() function and set a variable to 'closed'. Furthermore I am removing the modal object an re-instantiate it when opened again. But that does not cover the cases in which the user clicks on the backdrop or presses the ESC-key to close the modal.

Is there a clean way to cover these cases, too?

1 Answers
Related