title: Angular 1.4.5 : Uncaught Error: [$injector:modulerr] ngRoute
body: <p>When I try to refresh the page I have this error : </p>
  
  <blockquote>
    <p>angular.js:38 <a href="http://errors.angularjs.org/1.4.5/" rel="noreferrer">http://errors.angularjs.org/1.4.5/</a>$injector/modulerr?<br>
    p0=myApp&amp;p1=Error%3A%2…ogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.5%2Fangular.min.js%3A19%3A381)</p>
  </blockquote>
  
  <p>I have a simple module with a dependency of ngRoute: </p>
  
  <pre><code>var app = angular.module('myapp', ["ngRoute"]);
  
  app.config(function ($routeProvider) {
  
  $routeProvider
  .when('/', {
      templateUrl :'pages/main.html',
      controller : 'mainController'
  
  })
  
  .when('/second',{
      templateUrl : 'pages/second.html',
      controller : 'secondController'
  })
  
  
  });
  </code></pre>
  
  <p>and my html code:</p>
  
  <pre><code>&lt;html ng-app='myApp'&gt;
  &lt;head&gt;&lt;title&gt;The title&lt;/title&gt;&lt;/head&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5
  /angular.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.angularjs.org/1.4.5/angular-route.js"&gt;               
  &lt;script src="app.js"&gt;&lt;/script&gt;
  &lt;/script&gt;
  &lt;body&gt;
  
  &lt;div ng-view&gt;
  &lt;/div&gt;
  
  
  &lt;/body&gt;
  
  
  &lt;/html&gt;
  </code></pre>