title: AngularJS - Closing Modal Window
body: <p>My includes are:<br></p>
  
  <pre><code>bootstrap.css [ getbootstrap.com/2.3.2 ]
  angular/ui-bootstrap-tpls-0.10.0.min.js from: [ angular-ui.github.io/bootstrap ]
  </code></pre>
  
  <p>I am using AngularJS and Twitter Bootstrap.<br></p>
  
  <p><em>From AngularJS I open the modal window as follows:</em></p>
  
  <pre><code>var modalInstance = $modal.open({
                templateUrl: 'resources/html/mymodal.html',
                controller: 'mymodalController',
                scope: $scope
              });
  </code></pre>
  
  <p><em>My Modal Template is:</em></p>
  
  <pre><code>&lt;div class="modal"&gt;
  &lt;
    &lt;div class="modal-header"&gt;
      &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt; 
    &lt;/div&gt;
  .....
  &lt;/div&gt;
  </code></pre>
  
  <p><br>
  <strong>Question:</strong><br>
  The close [x] button is not working <br>
  When I click on it, the modal does not go away. But when I press Esc - the modal vanishes.<br>
  So looks like ... data-dismiss="modal" is not working. Any ideas?</p>