title: AngularJS: ngRoute no longer serves from wwwroot when fixing hash-bang
body: <p>I started out with this code, <code>app.js</code>:</p>
  
  <pre><code>var app = angular.module('myProject', ['ngStorage', 'ngRoute'])
      .config(function ($routeProvider) {
          $routeProvider.when("/", {
              controller: "loginController",
              controllerAs: "vm",
              templateUrl: "/index.html"
          }).otherwise({
              controller: "loginController",
              controllerAs: "vm",
              templateUrl: "/views/login.html"
          });
      });
  </code></pre>
  
  <p>If someone visited -</p>
  
  <p><code>http://localhost:8885</code></p>
  
  <p>it would redirect to <code>http://localhost:8885/#!/</code> and show the <code>index.html</code> template the <code>$routeProvider</code> had declared.</p>
  
  <p>And if someone visited either -</p>
  
  <p><code>http://localhost:8885/#!/asdfasdfasdf</code> or <code>http://localhost:8885/#!/1234</code></p>
  
  <p>the pages would load and show the <code>/views/login.html</code> template. </p>
  
  <p><strong>Everything was working fine.</strong></p>
  
  <p>Then, to exclude the <code>hash-bang</code>, known as (<code>/#!/</code>), I added:</p>
  
  <p><code>$locationProvider.html5Mode(true)</code> to the end of the <code>config</code> mentioned above.</p>
  
  <p>This caused my project to no longer serve my <code>src -&gt; MyProject -&gt; wwwroot</code> folder files anymore, but rather the content inside of my <code>src -&gt; Views -&gt; App -&gt; Index.html</code> file. File structure shown below:</p>
  
  <p><a href="https://i.stack.imgur.com/1cQQf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1cQQf.jpg" alt="Visual Studio ASP.Net "></a></p>
  
  <p>Why is this the case? How do I solve this to not only exclude the <code>hash-bang</code> but also to serve from my <code>wwwroot</code> folder?</p>
  
  <p><strong>EXTRA INFO</strong> - </p>
  
  <p>My <code>_Layout.cshtml</code> file has this for a body:</p>
  
  <pre><code>&lt;body ng-view&gt;
      &lt;div&gt;
          @RenderBody()
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I've also tried to place <code>&lt;base href="/"&gt;</code> inside the <code>&lt;head&gt;</code> but it didn't work.</p>
  
  <p>Any help?</p>