DEV Community

Discussion on: Publish your Angular app to Github Pages using Travis CI

Collapse
 
maxime1992 profile image
Maxime

Note that it's a good idea to use the router with the hash param set to true as github pages doesn't support the redirect to index.html:

RouterModule.forRoot(routes, { useHash: true })

Collapse
 
farhang profile image
Farhang Darzi • Edited

Thank you @Maxime for your nice idea, also you can copy the index.html to 404.html by Travis CI.

I just add this line to .travis.yml file in script section:

 - cp index.html 404.html 

Then the issues was solved.

My edited .travis.yml

You can see it in action.