title: $uib-modal error on open and close
body: <p>I am having problems opening up a simple modal popup.</p>
  
  <p>I am using uib-bootstrap 14.3, angular.js 1.4.7, bootstrap 3.3.5.</p>
  
  <p>I followed the documentation and examples I have found online and even with a blank modal template, not referencing item inside of template, I get same errors. Now some of my objects I am passing into the modal popup have long JSON date formatted DateTime members.</p>
  
  <p>In my HTML I have a details button inside of a table with ng-repeat on a database log records tracked by index:</p>
  
  <pre><code>&lt;a href="#" class="btn btn-default" ng-click="open('lg', $index)"&gt;Details &lt;i class="fa fa-eye"&gt;&lt;/i&gt;&lt;/a&gt;
  </code></pre>
  
  <p>In the controller that is where the above button is scoped in calls the modal instance as such:</p>
  
  <pre><code>$scope.open = function (size, $index) {
      var modalInstance = $uibModal.open({
          animation: true,
          templateUrl: 'Modal.html',
          controller: 'ModalInstanceCtrl',
          size: size,
          resolve: {
              item: function () {
                  return $scope.$storage.items[$index];
              }
          }
      });
  
      modalInstance.result.then(function (selectedItem) {
          $scope.selected = selectedItem;
      });
   };
  </code></pre>
  
  <p>the Modal Controller:</p>
  
  <pre><code>angular.controller('ModalInstanceCtrl', function ($scope, $uibModalInstance, item) {
       $scope.item = item;
  
       $scope.selected = {
           item: $scope.item
       };
  
       $scope.ok = function () {
           $uibModalInstance.close($scope.selected.item);
       };
  
       $scope.cancel = function () {
          $uibModalInstance.dismiss('cancel');
       };
  });
  </code></pre>
  
  <p>The Modal template:</p>
  
  <pre><code>&lt;div class="modal-dialog"&gt;
      &lt;div class="modal-content"&gt;
          &lt;div class="modal-header"&gt;
              &lt;h3 class="modal-title"&gt;Item&lt;/h3&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
              &lt;p&gt;{{item}}&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="modal-footer"&gt;
              &lt;button class="btn btn-primary" type="button" ng-click="ok()"&gt;OK&lt;/button&gt;
               &lt;button class="btn btn-warning" type="button" ng-click="cancel()"&gt;Cancel&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The error I see when I click on the button and the modal should appear losing focus on background:</p>
  
  <pre><code>Error: [$injector:unpr] Unknown provider: parseDateFilterProvider &lt;- parseDateFilter  http://errors.angularjs.org/1.4.7/$injector/unpr?p0=parseDateFilterProvider%20%3C-%20parseDateFilter
  
  at angular.js?v=122215174314:68
  at angular.js?v=122215174314:4289
  at Object.getService [as get] (angular.js?v=122215174314:4437)
  at angular.js?v=122215174314:4294
  at Object.getService [as get] (angular.js?v=122215174314:4437)
  at angular.js?v=122215174314:18229
  at isStateless (angular.js?v=122215174314:13130)
  at findConstantAndWatchExpressions (angular.js?v=122215174314:13187)
  at angular.js?v=122215174314:13190
  at forEach (angular.js?v=122215174314:336)
  </code></pre>
  
  <p>When I try to hit esc button on my keyboard I get:</p>
  
  <pre><code>TypeError: Cannot read property 'attr' of undefined
  
  at Function.extend.removeClass (angular.js?v=122215174314:3568)
  at m (angular-animate.js:1141)
  at F (angular-animate.js:1198)
  at angular-animate.js:889
  at afterAnimating (ui-bootstrap-tpls-0.14.3.js?v=122215174314:3834)
  at processQueue (angular.js?v=122215174314:14745)
  at angular.js?v=122215174314:14761
  at Scope.$eval (angular.js?v=122215174314:15989)
  at Scope.$digest (angular.js?v=122215174314:15800)
  at Scope.$apply (angular.js?v=122215174314:16097)
  </code></pre>
  
  <p>The item variable is referencing this object 3 integers, 1 string, and 1 datetime object from asp.net backend.</p>
  
  <p>The weird part is that even if I do not have anything with a date being referenced I still see the date parse provider error.</p>