I am using ng2-admin template following their installation guide https://akveo.github.io/ng2-admin/articles/002-installation-guidelines/ it is running perfectly in local but when I am creating production build using "npm run build:prod:aot" and running it on server the project is able to fetch js files but all assets getting 404. I have tested by defining base href in index.html but uanble to resolve the issue.
ng2-admin aot build unable to fetch images, fonts from assets
190 views Asked by Suman At
4
There are 4 answers
1
On
I found the solution at last.
Please edit "package.json" to the following image.
I added line 29:

Here I deployed to http://localhost/ng2admin/dist on my local machine.
And then:
C:\xampp\htdocs\ng2admin> npm run build:demo
This was my final solution.
Have you checked if the assets actually exist on the server? Are the assets getting copied to the build directory and deployed?