title: Angular 4 IIS routing issue
body: <p>I have implemented a Angular 4 application and ready for deployment to IIS 7.5 on Windows Server 2008 R2 so just simplify things I just created a new Angular 4 project using Angular CLI and build it with ng build --prod.  Then Added a new Web Site in IIS named AngularApp and map to C:\Inetpub\wwwroot\AngularApp.   I copied over all the files under dist.  I also added the URL rewrite to web.config.  When I go to URL <a href="http://localhost/AngularApp" rel="nofollow noreferrer">http://localhost/AngularApp</a>, I see the Loading... but app works! never show.  I know there are some similar issues already raised but I follow everything I find online by changing  <code>&lt;base href="/"/&gt;</code> to <code>&lt;base href="/AngularApp/"/&gt;</code> and the URL rewrite but doesn't seem to find a solution. Angular code is directly from Angular CLI without modification. Not sure what I am missing here...</p>
  
  <p>Below is the rewrite</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
    &lt;system.webServer&gt;
      &lt;rewrite&gt;
          &lt;rules&gt;
              &lt;rule name="angularjs routes" stopProcessing="true"&gt;
                  &lt;match url=".*" /&gt;
                  &lt;conditions logicalGrouping="MatchAll"&gt;
                      &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
                      &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
                      &lt;add input="{REQUEST_URI}" pattern="^/$" negate="true"/&gt;
                  &lt;/conditions&gt;
                  &lt;action type="Rewrite" url="/" /&gt;
              &lt;/rule&gt;
          &lt;/rules&gt;
      &lt;/rewrite&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;</code></pre>
  </div>
  </div>
  </p>