I’ve found this guide on creating an Angular 4 inside of .NET core very helpful. One of the steps is to set up .NET core to serve static files:
However, if you add routing to Angular 4, there’s an additional step that will allow your routes to resolve correctly in the angular application if a user hits them directly. For example, say you have a page in your angular app /about-us. If a user were to refresh their browser or hit the /about-us url directly, it would return a 404 – .NET core doesn’t recognize that route.
If you add the following code to the top of your Configure method in Startup.cs, it will automatically route anything that is not an API route and doesn’t have an extension to the Index. From there, Angular will take care of the routing.