title: Follow download link and dismiss modal?
body: <p>I have inherited a GUI written with Angular, and at the moment I don't even know enough to trim it down to a fiddle.  So I'm hoping this is more straightforward than it appeared on a quick Google. </p>
  
  <p>I have a modal dialog created using Bootstrap that is basically the same as the live demo here: <a href="http://getbootstrap.com/javascript/" rel="nofollow">http://getbootstrap.com/javascript/</a>   </p>
  
  <p>A copy of the source from that link:</p>
  
  <pre><code>&lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
    &lt;div class="modal-dialog"&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
          &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt;
        &lt;/div&gt;
        &lt;div class="modal-body"&gt;
          ...
        &lt;/div&gt;
        &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
          &lt;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The main difference in my case is that the "Save Changes" button is actually a link - to a resource which is downloaded without leaving the page.  It looks like this:</p>
  
  <pre><code>&lt;a ng-href="{{downloadUrl}}" class="btn btn-primary"&gt;Download&lt;/a&gt;
  </code></pre>
  
  <p>My goal is to have the above modal dialog dismissed when the link is clicked, while still downloading the file.  If I use <code>data-dismiss</code>, the download doesn't happen.</p>
  
  <p>If I need to go digging around the code, that's fine, but I'm hoping there's a simple change to the template that will do the trick.  Any suggestions?</p>