At First Install angular-cli ghpages
npm install -g angular-cli-ghpages
After installing next step is linking your repository. Run this command
ng build --prod --base-href "https://<user-name>.github.io/<repo>/"
If You See Error Then ommit --prod and Run This Command
ng build --base-href "https://<user-name>.github.io/<repo>/"
You can now see a dist folder in your angular 2 app directory.
Upload all files of dist folder on github repository.
Then From Settings Enable Github Pages. A link will be provided to you.
That's It.
Demo : https://shawon100.github.io/angularmaterial/
0 comments:
Post a Comment