Step 1. 安装node
建议使用nvm安装
1 | curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash |
Step 2. 使用n安装lts版nodejs
node版本管理神器 n
1 | # 需要roo权限 |
Step 3. 安装 yarn
1 | npm i -g yarn |
Step 4. 安装 @angular/cli
1 | npm i -g @angular/cli@6.0.0 |
Step 5. 创建angular项目
1 | # 添加css预处理器scss [angular cli css preprocessor](https://github.com/angular/angular-cli/wiki/stories-css-preprocessors) |
Step 6. 运行angular
1 | cd angular6-demo |