title: AngularJS routeprovider injection error
body: <p>I'm learning AngularJS, and I'm now trying the <code>$routeProvider</code>, but I can't get it to work.</p>
  
  <p><code>index.html</code>:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html ng-app="App"&gt;
      &lt;head&gt;
          &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular-route.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="scripts/controllers.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div ng-view&gt;&lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><code>view.html</code>:</p>
  
  <pre><code>&lt;p&gt;Hello World!&lt;/p&gt;
  </code></pre>
  
  <p><code>controllers.js</code>:</p>
  
  <pre><code>var app = angular.module('App', ['ngRoute']);
  
  app.config(
      function($routeProvider){
          $routeProvider.when("/something",{
              templateUrl: "view.html",
              controller: "MyController"
          })
          .otherwhise({
              redirectTo: "/"
          });
      }
  );
  
  function MyController($scope){
  
  }
  </code></pre>
  
  <p>Whenever I run this, I get an error message that says</p>
  
  <pre><code>Uncaught Error: [$injector:modulerr]
  </code></pre>
  
  <p>How can I solve this?</p>