Reputation: 386
I made a simple Angular 5 cover to say that I'm still constructing this website.
ng serve
works fine locally, but now I wanted to host this on my schools website here and I get all these 404 resources not found and all I did was copy whats in the dist/ folder after running ng build --prod
to the www/ folder on the webserver.
It's angular 5 with this cli version:
"@angular/cli": "~1.7.1",
"@angular/compiler-cli": "^5.2.0",
I tried to push another one to github-pages and this has the same problem githubpages the repo is repo but it's almost an empty repo.
Upvotes: 2
Views: 2561
Reputation: 2650
You need to add --base-href
parameter when you build your application, like this:
ng build --prod --base-href /~320255eg/
Where /~320255eg/
represents the path to your application.
Upvotes: 8