指令行建立:
ng new jerryfirstapp
建立完畢:
ng serve --open,然後 localhost:4200 能看到如下頁面:
建立一個新的 gh-pages 分支:
git checkout -b gh-pages
使用如下指令行進行建構:
ng build --output-path docs --base-href /first-angular/
當建構完成時,把 docs/index.html 複制為 docs/404.html。
之後,我就可以用下面這個連結,通路我釋出在 gh-pages 上的應用了:
https://wangzixi-diablo.github.io/first-angular/