Look, i recently finished my project and went happy to send it to my Apache server.
My Apache server has the standard folder structure www as the source and inside of it you put you files.
I ran the command in my project: ng build --prod
, and gave me the following files:
my folder structure
So i copied the content of the dist file and paste it in the path: ./www/test/FitProject
in my Apache folder and ran my server.
But the console hitted me with an error saying:
So i tought, maybe it is searching for these files in the source folder(www) so i copied these files and paste it in the www folder and work out just fine.
So what can i do to stop this error and tells to the angular project to look for these files inside it's own folder, not in www ?
You need to set a option --base-href
when build a project.
ng build --prod --base-href /test/FitProject/