title: How to prevent Angular-UI bootstrap modal closing?
body: <p>I do have a <code>$modalInstance</code>. I can receive close event notification with the help of the promises:</p>
  
  <pre><code>$modalInstance.result.finally(function() {
    // code here
  });
  </code></pre>
  
  <p>But I don't know how to prevent closing if user closes the model by mistake. I want to ask user if one really wants to close the model and close it if he does. Still I don't want to enable <code>backdrop: 'static'</code>:</p>
  
  <pre><code>$modal.open({
    ... // other options
    backdrop : 'static'
  });
  </code></pre>
  
  <p>Thank you.</p>