I have a template loaded by ngRoute that contains a bootstrap modal dialog. When the user tries to leave the current row they're editing in a table, this dialog pops up to confirm if they're ok with losing their changes.
Bootstrap modal's inject an overlay at the body level, where as my view is a little deeper than that. Therefore the modal is hidden by the overlay. If I inject the modal to the same level I can see the overlay but now the scope is lost.
Is there a way to bind the scope somehow or another way to register to events so I can continue to communicate with the controller?
Here's the code pen I attempted: http://codepen.io/matthewrhoden1/pen/BzEBxQ in it you will find the point where I gave up is on trying to send the scope to the modal.
Keep in mind the html is being injected at a higher level with this line:
$('#secondModal').insertBefore('#outerOverlay');