App
前端框架的主干。项目需要继承BaseApp以提供应用的底层支持。
Code scaffolding
Run ng generate component component-name --project app
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project app
.
Note: Don't forget to add
--project app
or else it will be added to the default project in yourangular.json
file.
Build
echo "deb http://ftp.cn.debian.org/debian/ stretch main" >> /etc/apt/sources.list echo "deb http://ftp.cn.debian.org/debian/ stretch-updates main" >> /etc/apt/sources.list echo "deb http://ftp.cn.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list
Run ng build app
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
After building your library with ng build app
, go to the dist folder cd dist/app
and run npm publish
.
Running unit tests
Run ng test app
to execute the unit tests via Karma.
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.