I have an Angular app which runs perfectly in my local and production environment.. After a tiny change I made, I ran the app locally and it works fine.. Then I built the pr
.NET Core solution if you use SpaStaticFile service collection extension and API project for example.
Base href: /
// ConfigureServices
// Correct RootPath to your angular app build, based on angular.json prop
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "App/dist";
});
// Configure
// In order to serve files
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(
Path.Combine(Directory.GetCurrentDirectory(), "App", "dist")),
RequestPath = ""
});