My Angular application runs smoothly on ng serve
, but after building and uploading with ng build --prod
, the index.html file fails to open.
I've tried using various base href configurations like
<base href="#">, <base href="/">, <base href="#">
, but none of them seem to work for me.
I've attempted adjusting the href dist path, but I keep encountering an error in the console stating "Unhandled Navigation Error."
Here is a snippet from angular.json:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"analytics": "a59a14d2-db6f-4410-ae85-9d54453c06b9"
},
"version": 1,
"newProjectRoot": "projects",
"projects": {
"Acres": {
"projectType": "application",
...
}
},
"defaultProject": "Acres"
}
The loader of my app shows up, but no pages are displayed afterwards.