title: NG Serve with a VirtualPath or subdirectory
body: <p>We run our angular application in IIS as a virtual application "myapplication"</p>
  
  <p>In our angular app I have set in index.html:</p>
  
  <pre><code>&lt;base href="/myapplication/"&gt; 
  </code></pre>
  
  <p>It is working in IIS fine. However now NG serve does not work. As it can't find all the bundles under <a href="http://localhost/myapplication/" rel="nofollow noreferrer">http://localhost/myapplication/</a> because the CLI isn't running under that path.</p>
  
  <p>I have tried </p>
  
  <pre><code>ng serve --base-href /myapplication/
  </code></pre>
  
  <p>and browse to <a href="http://localhost:4200/myapplication/" rel="nofollow noreferrer">http://localhost:4200/myapplication/</a></p>
  
  <p>I still see the same errors.</p>
  
  <p>How do I tell the CLI to serve the application under "<a href="http://localhost:4200/myapplication/" rel="nofollow noreferrer">http://localhost:4200/myapplication/</a>"?</p>