title: 404 Not Found in AngularJS
body: <p>I just started AngularJS. When I try to implemt following example, I am getting </p>
  
  <blockquote>
    <p>404 Not Found</p>
  </blockquote>
  
  <p>This is my main.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="demoApp"&gt;
  &lt;script src="angular.min.js"&gt;&lt;/script&gt;
  &lt;head&gt;
      &lt;title&gt;main page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div ng-view&gt;&lt;/div&gt;
  
  &lt;script&gt;
  var demo = angular.module('demoApp',[]);
  
  demo.config(function ($routeProvider){
      $routeProvider
          .when ('foo',{
              controller : 'SimpleController',
              templateUrl: 'first.html'
          })      
      });
  
  demo.controller('SimpleController',function($scope){
      $scope.customers = [
          {name: 'sac',city:'abcd'},
          {name: 'mac',city:'efgh'},
          {name: 'nalaka',city:'ijkl'}
      ];
  });
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My first.html</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li ng-repeat="cus in customers "&gt;{{ cus.name }}&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>When I visit <code>localhost/foo</code> I am getting 404 exception. I just started AngularJS. So any help/guide to solve this problem will be a great help for me.</p>
  
  <p>Thanks in advance</p>