title: Unknown provider: $modalInstanceProvider <- $modalInstance
body: <p>I am trying to call a modal using angularui-bootstrap like this.</p>
  
  <pre><code>var authApp = angular.module('AuthApp', ['ui.bootstrap']);
  authApp.controller('AuthController',
   ['$scope', '$uibModal',
   function ($scope, $uibModal) {
       //$scope.credentials = {
       //    userName: "",
       //    uPassword: "",
       //    rememberMe: ""
       //};
       $scope.OpenLoginModal = function (templateUrl) {
           var modalInstance = $uibModal.open({
               animation: false,
               backdrop: 'static',
               templateUrl: templateUrl,
               controller: 'loginModalController'//,
               //resolve: {
               //    credentials: function () {
               //        return $scope.credentials;
               //    }
               //}
           });
       };
   }]);
  
  authApp.controller('loginModalController',
   ['$scope', '$modalInstance', 'AuthService',
   function ($scope, $modalInstance, AuthService) {
       //$scope.credentials = credentials;
       //$scope.headerTitle = 'Login Information';
  
       $scope.LoginUser = function () {
           //var data = {};
           //console.log($scope.credentials);
           AuthService.ValidateServerAccessDetails(data).then(function (response) {
               //$modalInstance.close(response.data);
           }, function (response) {
               //$scope.userName = "";
               //$scope.passWord = "";
           });
       };
  
       $scope.CancelLogin = function () {
           $modalInstance.dismiss('cancel');
       };
   }]);
  </code></pre>
  
  <p>And I am getting this error,</p>
  
  <blockquote>
    <p>Error: [$injector:unpr] Unknown provider: $modalInstanceProvider &lt;- $modalInstance &lt;- loginModalController</p>
  </blockquote>
  
  <p>I am also getting the same error in Plunker: <a href="https://plnkr.co/edit/3rmapgrLhYJ3plyPWm87" rel="nofollow noreferrer">https://plnkr.co/edit/3rmapgrLhYJ3plyPWm87</a></p>
  
  <p>What am I doing wrong?
  Versions used are angularjs-1.4.7 and angularui-1.1.2</p>
  
  <p>P.S: I checked many answers here. One of the question that came close was this one. <a href="https://stackoverflow.com/q/30742887/17447">Unknown provider: $modalInstanceProvider &lt;- $modalInstance in Angularjs modal</a></p>