0.0.5 • Published 6 years ago
npmtestdt v0.0.5
环境准备(项目目录下运行)
安装淘宝镜像(加速镜像)
使用淘宝镜像:
npm config set registry https://registry.npm.taobao.org
安装必须包(不要使用cnpm 安装,如果出现sass安装不上的时候,再使用cnpm安装)
npm install
PrimeNG Angular-CLI
This project was generated with Angular CLI version 1.0.0-rc.1.
启动服务
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
自动创建代码
创建新画面
在项目根目录下运行 ng g component component-name
来创建新页面.
例,运行:
ng g component pages/bom/bom-list
将在项目下创建以下文件,并自动在app.module.ts中引用。
src/app/pages/bom/bom-list/bom-list.component.css
src/app/pages/bom/bom-list/bom-list.component.html
src/app/pages/bom/bom-list/bom-list.component.spec.ts
src/app/pages/bom/bom-list/bom-list.component.ts
Build
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Running unit tests
Run ng test
to execute the unit tests via Karma.
Running end-to-end tests
Run ng e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.