title: Angular UI pop up error: $uibModal is undefined
body: <p>I'm trying to get an AngularUI Modal going but it's giving me an error ( $uibModal is undefined) as well as a headache.</p>
  
  <p>I'm using version  angular-ui-bootstrap-0.14.3. (so it uses $uibModal and not $modal)</p>
  
  <p>The error shows against the line <strong>var modalInstance = $uibModal.open({...</strong></p>
  
  <p>This is a cut down version of my controller (which holds the click event)</p>
  
  <pre><code>'use strict';
      angular.module('MPAapp')
          .controller('workCentreCtrl',
                      ['$scope', '$rootScope', 'toastrFactory', 'workCentreResource',
                       workCentreCtrl])
  
    function   workCentreCtrl($scope, $rootScope, toastrFactory, workCentreResource, $uibModal, $log) {
          // Click event code to open the modal
          $scope.EditWorkOrder = function (slot, max) {            
              var modalInstance = $uibModal.open({
                  animation: true,
                  templateUrl: '/app/WorkOrder/Views/EditWorkOrder.html',
                  controller: 'EditWorkOrderCtrl',
                  size: 'lg',
                  resolve: {
                      Slot: function () {
                          return slot;
                      },
                      Max: function () {
                          return max;
                      }
                  }
              });
  
              modalInstance.result.then(function (selectedItem) {
                  $scope.selected = selectedItem;
              }, function () {
                  $log.info('Modal dismissed at: ' + new Date());
              });
              console.log('md opened')
          };
      }
  </code></pre>
  
  <p>This is the receiving controller</p>
  
  <pre><code>    'use strict';
      angular.module('MPAapp')
          .controller('EditWorkOrderCtrl', ['$scope', '$timeout', 'toastrFactory', 'workCentreResource', 'blockedDatesResource',
              EditWorkOrderCtrl]);
  
      function EditWorkOrderCtrl($scope, $timeout, toastrFactory, workCentreResource, blockedDatesResource, $uibModalInstance, Slot, Max) {
  // rest of my code in here....
  };
  </code></pre>
  
  <p>Any ideas on this will be very much appreciated.
  itsdanny.</p>