title: how to use angular-ui modal templateURL with node/express routing
body: <p>I'm somewhat confused as to why I get this error. I have a hunch it's with the templateURL and I have tried a few things but to no avail. I have read the documentation and scoured a bunch of SO posts but none of them helped much. I want to use Express/Node to serve up the pages and I have a feeling that's why my templateURL isn't working in app.js.</p>
  
  <p>Here is my index.html with my controller and my template.</p>
  
  <pre><code>&lt;body ng-app="app" ng-controller="AppCtrl"&gt;
  &lt;script type="text/ng-template" id="pageContent.html"&gt;
      &lt;div class="container"&gt;
          &lt;div class="modal-header"&gt;
              &lt;h3 class="modal-title"&gt;I am a modal!&lt;/h3&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
              &lt;h1&gt;HELLO&lt;/h1&gt;
          &lt;/div&gt;
          &lt;div class="modal-footer"&gt;
              &lt;button class="btn btn-primary" type="button" ng-click="cancel()"&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;/script&gt;
  &lt;div ng-click="open()"&gt; &lt;!-- this is what makes the modal --&gt;
  &lt;!-- rest of html below --&gt;
  </code></pre>
  
  <p>This is what is in app.js</p>
  
  <pre><code>var app = angular.module("app", ["ngAnimate", 'ui.bootstrap']);
  
  app.controller("AppCtrl", function($scope, $timeout, $uibModal, $http) {
  
      $scope.open = function (person) {
          $scope.selectedPerson = "passed in person";
          console.log($scope.selectedPerson);
  
  
          var modalInstance = $uibModal.open({
              templateUrl: 'pageContent.html',
              controller: 'ModalInstanceCtrl',
              resolve: {
                  selectedPerson: function() {
                      return $scope.selectedPerson;
                  }
              }
          });
  
      };
  });
  
  app.controller('ModalInstanceCtrl', function ($scope, $uibModalInstance, selectedPerson) {
  
      $scope.selectedPerson = selectedPerson;
  
  
      $scope.cancel = function () {
          $uibModalInstance.dismiss('cancel');
      };
  });
  </code></pre>
  
  <p>I have also tried to replace templateURL with <code>template: "&lt;p&gt; hello world &lt;/p&gt;"</code> but that also produces same error.</p>
  
  <p>Here is the error trace:
  <a href="https://i.stack.imgur.com/fZ11B.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fZ11B.png" alt="enter image description here"></a></p>