title: Angular js Route Errors
body: <p>I'm trying to create a navigation menu..... this is how my html looks like.....</p>
  
  <pre><code>@{
      ViewBag.Title = "Index";
      Layout = "~/Views/Shared/_Layout.cshtml";
      &lt;script src="~/Scripts/Course/Course-Module.js"&gt;&lt;/script&gt;
  }
  &lt;div class="container"&gt;
      &lt;div class="row"&gt;
          hello{{2+2}}
          &lt;div class="navbar navbar-default"&gt;
              &lt;div class="navbar-header"&gt;
                  &lt;ul class="nav navbar-nav"&gt;
                      &lt;li&gt;&lt;span class="navbar-brand"&gt;Registration&lt;/span&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
              &lt;div class="navbar-collapse collapse"&gt;
                  &lt;ul class="nav navbar-nav"&gt;
                      &lt;li&gt;&lt;a href="#/Courses"&gt;Courses&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#/Instructors"&gt;Instructors&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
  
          &lt;/div&gt;
  
      &lt;/div&gt;
      &lt;div ng-view&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When i try to run this my web browser console gives me two errors saying.....</p>
  
  <blockquote>
    <p>Error: [ng:areq]
    <a href="http://errors.angularjs.org/1.3.14/ng/areq?p0=CoursesController&amp;p1=not%20aNaNunction%2C%20got%20undefined" rel="nofollow">http://errors.angularjs.org/1.3.14/ng/areq?p0=CoursesController&amp;p1=not%20aNaNunction%2C%20got%20undefined</a>
        at Error (native)
        at <a href="http://localhost:49516/Scripts/AngularJs.js:7:500" rel="nofollow">http://localhost:49516/Scripts/AngularJs.js:7:500</a>
        at Sb (<a href="http://localhost:49516/Scripts/AngularJs.js:57:23" rel="nofollow">http://localhost:49516/Scripts/AngularJs.js:57:23</a>)
        at tb (<a href="http://localhost:49516/Scripts/AngularJs.js:59:66" rel="nofollow">http://localhost:49516/Scripts/AngularJs.js:59:66</a>)
        at <a href="http://localhost:49516/Scripts/AngularJs.js:303:231" rel="nofollow">http://localhost:49516/Scripts/AngularJs.js:303:231</a>
        at A.link (<a href="https://code.angularjs.org/1.3.14/angular-route.min.js:7:268" rel="nofollow">https://code.angularjs.org/1.3.14/angular-route.min.js:7:268</a>)
        at Z (<a href="http://localhost:49516/Scripts/AngularJs.js:281:137" rel="nofollow">http://localhost:49516/Scripts/AngularJs.js:281:137</a>)
        at A (<a href="http://localhost:49516/Scripts/AngularJs.js:242:276" rel="nofollow">http://localhost:49516/Scripts/AngularJs.js:242:276</a>)
        at g (<a href="http://localhost:49516/Scripts/AngularJs.js:210:393" rel="nofollow">http://localhost:49516/Scripts/AngularJs.js:210:393</a>)
        at <a href="http://localhost:49516/Scripts/AngularJs.js:206:510" rel="nofollow">http://localhost:49516/Scripts/AngularJs.js:206:510</a></p>
  </blockquote>
  
  <p>And.......</p>
  
  <blockquote>
    <p>GET <a href="http://localhost:49516/Scripts/angular.min.js.map" rel="nofollow">http://localhost:49516/Scripts/angular.min.js.map</a> 404 (Not Found)</p>
  </blockquote>
  
  <p>I have already inserted my AngularRoute JS file and AngularRoute Map JS file in my layout page............ This is how my Module js looks like.............</p>
  
  <pre><code>var registrationModule = angular.module("registrationModule", ['ngRoute']);
  
  registrationModule.config(['$routeProvider',
      function ($routeProvider) {
          $routeProvider.
              when('/Courses', {
                  templateUrl: '/Templates/Courses.html',
                  controller: 'CoursesController'
              }).
              when('/Instructor', {
                  templateUrl: '/Templates/Instructors.html',
                  controller: 'InstructorsController'
              }).
              otherwise({
                  redirectTo: '/Courses'
              });
      }]);
  </code></pre>