title: Angular UI Bootstrap Module Not Closing on Back Button
body: <p>I'm using a module from the UI Boostrap extensions (<a href="http://angular-ui.github.io/bootstrap" rel="noreferrer">http://angular-ui.github.io/bootstrap</a>).  The module actually serves as a loading dialog and is automatically closed when a set of web service data is returned to my Angular code.  As the data on this page is loaded automatically the dialog comes up immediately.</p>
  
  <p>All this works great when I hit the page in question for the the first time or simply refresh it. The problem occurs when I go to a deeper page and then try and navigate back to the original page (with the dialog) via the browser's back button. The dialog never goes away despite all the fact that all the data is returned and the module's dismiss() call has been made.  </p>
  
  <p>I've traced this down to the promise to open the dialog appears to be happening after the dismiss call but, again, only when the page is loaded via the back button. The dismiss call never closes anything because it hasn't been added yet (I've confirmed this in the debugger).  </p>
  
  <p>The question I have is how could I handle this?  Is there a solid way to catch the completion of the page loading via Angular and double check that the dialog closed? Is there a better way via UI Bootstrap's api?</p>
  
  <p>I know this is rather unusual case but any thoughts on it would be great.</p>
  
  <p>Thanks!</p>