Web.config for hosting an Angular application on Azure Web App

If you host an Angular application on Microsoft Azure you probably want to define a mime map for .json and .woff / .woff2 files to get rid of the console errors. Also to enable client-side routing we have to add a rewrite rule.

This is how my web.config looks like:

To ensure the config gets deployed, put it in the src directory:

vs

And add it to list of assets within the .angular-cli.json:

cli