命令
// 发布 angular 包
npm install ng-packagr --save-dev
"packagr": "ng-packagr -p ng-package.json"
// 加快npm 的访问速度
--registry=https://registry.npm.taobao.org
// 打生产包
ng build --target=production --base-href '/'
// 优化速度 --prod 摇树优化 --aot预编译功能
ng build --prod --aot
// 预览dist页面
npm install -g now
now
// 创建一个项目
ng new --ng4 projectName
// 创建sass项目 scss
ng new sassy-project --style=scss
// run application
ng serve --port 9001 -o
// 生成一个组件
ng generate component product
// 简写
ng g c product
// 不生成测试
ng g c product --spec=false
// http-server
http-server --cors=Access-Control-Allow-