One of the nice features in ASP.NET Core (MVC) is the introduction of Tag Helpers, a more HTML friendly alternative for HtmlHelpers.
A built-in Tag Helper is the Environment Tag Helper, it conditionally renders its enclosed content based on the current hosting environment.
In my case I wanted to render some content in the development environment and add some other content in all other environments(test, uat, production). To support this scenario, the Environment Tag Helper gives you include
& exclude
attributes to control rendering the enclosed content based on the included or excluded hosting environment names.
An example:
In the example above I'm changing the base href for Angular depending on the environment. In development I'm running my angular site under the web application root whereas in other environments I'm running my angular site under a virtual directory.