Installing in a sub-folder of Angular
Finally got it working, the following are the changes I've made. I am writing this here in case anyone faces the same problem.


I noticed there was another web.config file in root of Drupal folder (/content) and it contains a few rewrite rules.
I've changed the last rewrite rule which rewrite all requests to index.php, it now looks like this:


&lt;!-- Pass all requests not referring directly to files in the filesystem to index.php. --&gt;
&lt;rule name="Short URLS" stopProcessing="true"&gt;
  &lt;match url="^(.*)$" ignoreCase="false" /&gt;
  &lt;conditions&gt;
    &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /&gt;
    &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /&gt;
    &lt;add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" /&gt;
  &lt;/conditions&gt;
  &lt;action type="Rewrite" url="/content/index.php" /&gt; &lt;!-- CHANGES IN THIS LINE, ADDED '/content'/ in front of index.php --&gt;
&lt;/rule&gt;        



Modified .htaccess file in root of Drupal folder and added this line RewriteBase /content, below this line # RewriteBase /
Modified the web.config file in root folder of Angular App (/) to the following: 


&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;configuration&gt;
  &lt;!-- Install IIS url rewrite module. --&gt;
  &lt;system.webServer&gt;
    &lt;rewrite&gt;
      &lt;rules&gt;
        &lt;clear /&gt;
        &lt;rule name="Angular Routes" stopProcessing="true"&gt;
          &lt;match url="(.*)" negate="false" /&gt;
          &lt;conditions logicalGrouping="MatchAll" trackAllCaptures="false"&gt;
                        &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
                        &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
                        &lt;add input="{URL}" pattern="^/content/(.*)$" negate="true" /&gt;
          &lt;/conditions&gt;
          &lt;action type="Rewrite" url="./index.html" /&gt;
        &lt;/rule&gt;
      &lt;/rules&gt;
    &lt;/rewrite&gt;
  &lt;/system.webServer&gt;

&lt;/configuration&gt;