title: asp.net mvc hosting angular app with html5mode and routing
body: <p>Alright, so I am hosting an angularjs inside asp.net mvc 5 and are using the <code>html5mode(true)</code> in my angular app to get rid of all hash signs in the url. 
  Everything works great, however, with my current setup that looks like this:</p>
  
  <p>RouteConfig.cs: </p>
  
  <pre><code>        routes.MapRoute(
              name: "Default",
              url: "app/{angular}",
              defaults: new { controller = "Ng", action = "Index", angular= UrlParameter.Optional }
          );
  </code></pre>
  
  <p>So that when I navigate to <strong><code>http://url/app/myangularroute</code></strong> my <strong>Ng/Index</strong> action returns the view which contains the ng-view container and the angular app is now active and working with the route provided</p>
  
  <p>Now, my problem here is, when I navigate to <strong><code>http://url/app/</code></strong> it returns a dir listning not allowed error which I cannot understand. Shouldn't my index action be returned as the angular parameter is set to optional?</p>
  
  <p>And can I somehow avoid the "app" completely and still get my angular app to work? I have tried some rewrite rules but that gives me alot of errors because I am making use of the mvc bundling and minification functionality.</p>
  
  <p>I could live with the url being the format it currently is but without the need to provide the optional parameter, like <strong><code>http://url/app/</code></strong></p>
  
  <p>Also, it's only an angular app, no other mvc view than the index.cshtml wrapper.</p>
  
  <p><a href="https://stackoverflow.com/questions/21095835/using-html5mode-for-navigating-with-angularjs-at-non-root-url">This guy seems to get it to work, but I can't see his mvc routes</a></p>