第二種方式:客製化建立mypage2的元件
如果方式一中自動建立的資料夾都不需要,可以在建立專案時加上 –flat 參數。
若不需要建立 style 樣式css檔,可以加上 -is 參數。
若不需要建立 template樣板檔html,可以加上 -it 參數。
若不需要建立 unit testing 單元測試檔spec.ts,可以在 angular.json內的 schematics加上此段程式碼
“@schematics/angular:component”: {
“skipTests”: true
}