title: Angular.js ng-view ignoring routing
body: <p>I'm trying to create a simple todo list app in Angular.js and am having difficulties getting routing and ng-view to work properly. I've been working primarily through examples of code written by Dan Wahlin <a href="https://www.youtube.com/watch?v=rAyEGv67P-U" rel="nofollow">Modules, Routes and Factories</a></p>
  
  <p>Right now, when I run this code, I know that Angular has been started properly and functions but ng-view doesn't seem to know what my routes.js file is telling it to display, (my two partial files are just random text so I'll know when ng-view worked properly...). I think I have everything properly coded in my routes.js but can't quite figure out why ng-view still doesn't get processed by Angular. Can someone explain to me why ng-view is being ignored in my code?</p>
  
  <p>Currently, here are the files I have:</p>
  
  <p>index.html</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en" ng-app="todoApp"&gt;
  &lt;head&gt;
      &lt;link rel="stylesheet" type="text/css" src="css/app.css"&gt;
      &lt;title&gt;Todo App&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div ng-view&gt;&lt;/div&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"&gt;    &lt;/script&gt;
  &lt;script src="js/routes.js"&gt;&lt;/script&gt;
  &lt;script src="js/controllers.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>controller.js</p>
  
  <pre><code>var todoApp = angular.module('todoApp');
  
  todoApp.controller('UsersCtrl', function($scope) {
      $scope.users = [];
  });
  
  todoApp.controller('TodoCtrl', function($scope) {
      $scope.todos = [];
  });
  </code></pre>
  
  <p>routes.js</p>
  
  <pre><code>var todoApp = angular.module('todoApp', []);
  
  todoApp.config(['$routeProvider', function($routeProvider) {
      $routeProvider.when('/users', {templateURL: 'partials/users.html', controller: 'UsersCtrl'});
      $routeProvider.when('/todos', {templateURL: 'partials/todos.html', controller: 'TodoCtrl' });
      $routeProvider.otherwise({ redirectTo: '/users' });
  }]);
  </code></pre>