Reputation: 86740
I'm trying to publish my angular2 todo app using github pages, i have followed all steps given in the documentation of github pages, choose theme, choose folder i.e dist after all configuration i got error of files missing here like this
any help to publish my app would be appriciated. here is repo's link
https://github.com/PardeepJain/Mean
and link is
https://pardeepjain.github.io/Mean/dist/
I want to publish my code like this repo
Upvotes: 0
Views: 56
Reputation: 696
while building your app include . as your base href
i.e
ng build --base-href .
Then push to github.
Upvotes: 2
Reputation: 19622
1 -- If you want the application to run on the root directory - create a special repo with the name [yourgithubusername].github.io and opush these files in the master branch
2 -- Where as if you want to create these page in the sub directory of in a different brach other than than the root , create a branch gh-pages and push these files in that branch.
In both the cases the way we access these deployed pages will be different .
For the First Case it will be https://[yourgithubusername].github.io and for the second case it will be [yourgithubusername].github.io/[Repo name].
If Suppose you want to deploy it using the second case make sure to change the base url pf the index.html file in the dist as all the route mappings depend on the path you give and it should be set to [/branchname].
A working example of the Same - https://rahulrsingh09.github.io/AngularConcepts
and https://rahulrsingh09.github.io/Deployment/
check this for reference - https://github.com/rahulrsingh09/Deployment
Upvotes: 1