title: Angular-ui modal issue
body: <p>I'm trying to include an angular-ui modal in my web application but am having issues with getting everything set up. </p>
  
  <p>The documentation indicate that you can use $modalInstance to inject the child controller into the parent controller but I don't quite understand how to go about doing so.</p>
  
  <p>Here is the current code (it is straight from the modal demo from the documentation):</p>
  
  <pre><code>angular.module('myApp.controllers', []).
  controller('addContent', function ($scope, $http, $modal, $log){
  
      //modaltest
      $scope.items = ['item1', 'item2', 'item3'];
  
      $scope.addTerm = function () {  
          var newTerm = $modal.open({
              templateUrl: 'newTermModal.jade',
              controller: newTerms,
              resolve: {
                  items: function () {
                      return $scope.items;
                  }
              }
          });
  
          newTerm.result.then(function (selectedItem) {
              $scope.selected = selectedItem;
          }, function () {
              $log.info('Modal dismissed at: ' + new Date());
          });
      };
  
  }).
  controller("newTerms",function($scope, $modalInstance, items){
  
      $scope.items = items;
      $scope.selected = {
          item: $scope.items[0]
      };
  
      $scope.ok = function () {
          $modalInstance.close($scope.selected.item);
      };
  
      $scope.cancel = function () {
          $modalInstance.dismiss('cancel');
      };
  
  });
  </code></pre>
  
  <p>When I run the app like it is now and click the button to open the modal (addTerm function) the app crashes with the error "ReferenceError: newTerms is not defined."</p>
  
  <p>As I mentioned above, the angular-ui site indicates you can inject a controller with $modalInstance but I have not been able to figure out how.
  a
  Any help would be greatly appreciated! </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>After adding the quotation marks on the pathname as suggested by Chandermani, it seems the modal is loading in the current page rather than the specified template. </p>
  
  <p>I've changed the path to the following: templateUrl: </p>
  
  <pre><code>    $scope.addTerm = function () {  
          var newTerm = $modal.open({
              templateUrl: './views/partials/newTermModal.jade',
              controller: 'newTerms',
              resolve: {
                  items: function () {
                      return $scope.items;
                  }
              }
          });
  </code></pre>
  
  <p>A screenshot of the issue follows:<img src="https://i.stack.imgur.com/I3pQt.png" alt="screen shot of the issue"></p>
  
  <p>Any idea what could be causing this?</p>