一、建立元件
ng generate component component-name #簡寫 ng g c component-name
ng generate directive|pipe|service|class|guard|interface|enum|module #還可以建立其他的
#建立使用者模組
ng g c components/users/list #建立使用者查詢清單畫面
ng g c components/users/edit #建立使用者新增畫面
ng g c components/users/view #建立使用者檢視畫面
#其他
ng g c components/home #首頁元件
ng g c components/navbar #導航
ng g c components/sidebar #左側導航
ng g c components/login #登陸
ng g c components/register #注冊
ng g c components/settings #設定
ng g c components/pageNotFount #頁面404
二、會在src/app中建立components目錄并建立相關元件

轉載于:https://www.cnblogs.com/chuancheng/p/8365736.html