1. 程式人生 > 實用技巧 >安裝 Angular CLI腳手架

安裝 Angular CLI腳手架

安裝 Angular CLI
(提前安裝node.js環境)
1.)npm install -g @angular/cli


2.)ng version 命令來驗證是否安裝成功


開始建立專案
cd 到一個資料夾執行下面命令
3.)ng new my-app


是否願意和谷歌團隊共享資料:N
Would you like to share anonymous usage data with the Angular Team at Google under
Google’s Privacy Policy at https://policies.google.com/privacy? For more details and
how to change this setting, see http://angular.io/analytics. (y/N) 是否開啟嚴格模式:N ? Do you want to enforce stricter type checking and stricter bundle budgets in the workspace? This setting helps improve maintainability and catch bugs ahead of time. For more information, see https://angular.io/strict (y/N)
是否預設配置路由:N ? Would you like to add Angular routing? (y/N) 是否css配置前處理器:N ? Which stylesheet format would you like to use? (Use arrow keys) > CSS SCSS [ https://sass-lang.com/documentation/syntax#scss ] Sass [ https://sass-lang.com/documentation/syntax#the-indented-syntax ] Less [ http://
lesscss.org ] Stylus [ https://stylus-lang.com ] cd 當前建立的專案 4.)cd my-app 啟動專案 5.)ng serve --open 完成