title: $routeProvider not working and make request to the server with node.js
body: <p>I get <strong>Cannot GET /login</strong> when I pull <em>localhost:5000/login</em>  in the url . So the $routeProvider is not working and loading the view. Instead it is making the request to the server so basically it is fetching the page to the server. But I don't want to fetch the page to the server instead I want to load the view. My Application Structure is as follows:</p>
  
  <pre>
  lib<br>
  node_modules<br>
  public<br>
  ----js<br>
  ---------all js files like angular, script.js files here<br>
  ----stylesheets<br>
  ---------all css files here<br>
  views<br>
  app.js (main node file)<br>
  home.html<br>
  index,html<br>
  login.html<br>
  npm-debug.log<br>
  </pre>
  
  <p>I have the following setup in the sever-side with app.js as: </p>
  
  <pre><code>var express = require('express'),
      path = require('path'),
      app = express(),
      server = require('http').createServer(app)
      //io = require('socket.io').listen(server);
  
  app.use(express.static(path.join(__dirname, '/public')));
  app.use( app.router );
  
  
  server.listen(5000);
  console.log('listerning to port 5000');
  
  app.use(function(req, res){
      res.sendfile('./index.html', {root: __dirname});
  });
  </code></pre>
  
  <p>And on the client part the Angular script.js looks like this:</p>
  
  <pre><code>var app = angular.module('app', [])
  .config(['$routeProvider','$locationProvider', function($routeProvider, $locationProvider) {
  
      $locationProvider.html5Mode(true);
      $locationProvider.hashPrefix = '!';
  
      $routeProvider.when('/login', {
          template: 'login.html', 
          controller: 'LoginController'
      });
  
      $routeProvider.otherwise({redirectTo: 'login'});
   }]);
  </code></pre>
  
  <p>My index.html file have a directive </p>
  
  <p>I have no idea what I have done wrong. Any help could be great.</p>