基于 Angular Quickstart
git clone https://github.com/angular/quickstart ng4-quickstart
npm i
npm start
基于 Angular CLI
npm install -g typescript typings
npm install -g @angular/cli
ng --version
ng new PROJECT-NAME
ng serve
如果cli安装出错:
1,重新下载node安装重启 2,更新npm:npm install -g npm 3, npm uninstall -g @angular/cli;
npm cache clean --force
4,(删除C:\Users\..\AppData\Roaming\npm-cache目录及C:\Users\..\AppData\Roaming\npm\node_modules\@angular\cli目录) 5,重新安装@angular/cli
杀毒软件报错时,加入白名单