title: Nginx config works with angularjs route in HTML5 mode
body: <p>I am struggling with the nginx config file with angularjs route.</p>
  
  <p>In my case, I have these HTMLs:</p>
  
  <p><code>index.html</code>
  <code>description.html</code>
  <code>dashboard.html</code></p>
  
  <p>The <code>dashboard.html</code> is the one with angularjs code.</p>
  
  <p>Here is my current nginx config file:</p>
  
  <pre><code>upstream panda.dev {
      server 127.0.0.1:3333 max_fails=3 fail_timeout=30s;
  }
  
  server {
      listen       80;
      server_name  panda.dev;
      root /Users/Jeremy/Documents/Projects/PandaUnion/web/converted-html;
  
      # serve static files directly
      location / {
          index index.html$args;
          try_files $uri$args $uri$args/ $uri/ /dashboard.html$args =404;
      }
  }
  </code></pre>
  
  <p>Here is my angular code:</p>
  
  <pre><code>PandaUnion.controller('PandaController', function($routeParams, $location) {
    console.log($routeParams);
  });
  
  var templateURL = '/partials';
  
  PandaUnion.config(function($routeProvider, $locationProvider) {
    $locationProvider.html5Mode(true);
    return $routeProvider.when('/dashboard/:user_id', {
      templateUrl: templateURL + '/home.html'
    }).when('/dashboard/:user_id/setting', {
      templateUrl: templateURL + '/setting.html'
    }).when('/dashboard/:user_id/bill', {
      templateUrl: templateURL + '/bill.html'
    });
  });
  </code></pre>
  
  <p>With this config, I can get <code>dashboard.html</code> via visiting <code>/dashboard/123</code>, but I can't get <code>123</code> as routeParam in angular. </p>
  
  <p>It should print <code>{user_id: 123}</code> when I visit <code>/dashboard/123</code> but I only see an empty Object.</p>
  
  <p>What goes wrong here? Please help...</p>
  
  <p>(sorry for my poor English)</p>