title: Angular Modal - closing/dismissing modal
body: <p>I am new to Angular and trying to implement a modal. Having problem closing/dismissing the modal - when I click the cancel button, nothing happens.
  Here is the controller code:</p>
  
  <pre><code>angular.module('navApp')
      // Passing the $modal to controller as dependency
      .controller('HomeCtrl', ['$scope', '$uibModal', function ($scope, $uibModal) {
          $scope.title = "Hello, Angm-Generator!";
          $scope.open = function () {
              var modalInstance = $uibModal.open({
                  templateUrl: 'myModalContent.html',
                  controller: 'ModalCtrl'
              });
          };
      }])
  
      .controller('ModalCtrl', function ($scope, $uibModalInstance) {
          // Added some content to Modal using $scope
          $scope.content = "ModalCtrl, Yeah!"
          // Add cancel button
          $scope.cancel = function () {
              $uibModalInstance.dismiss('cancel');
          };
      })
  </code></pre>
  
  <p>and here is the template view of the actual modal</p>
  
  <pre><code>&lt;!-- Modal Script --&gt;
  &lt;script type="text/ng-template" id="myModalContent.html"&gt;
      &lt;div class="modal-header"&gt;
          &lt;button type="button" class="close" datadismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
          &lt;h3 class="modal-title"&gt;Hello from Modal!&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class="modal-body"&gt;
          Modal Content from: &lt;b&gt;{{ content }}&lt;/b&gt;
      &lt;/div&gt;
      &lt;div class="modal-footer"&gt;
          &lt;button class="btn btn-danger" ngclick="cancel()"&gt;Cancel&lt;/button&gt;
      &lt;/div&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>Even clicking the cross on the top right of modal doesn't close the modal. Any ideas? Thanks:)</p>