Linux command
ng-add 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Add package to project
ng add [package-name]
Add Angular Material
ng add @angular/material
Add PWA support
ng add @angular/pwa
Skip package installation
ng add [package] --skip-confirmation
说明
ng add adds npm packages with Angular schematics support to your project. Runs installation and configuration schematics automatically. Part of Angular CLI.
参数
- --skip-confirmation
- Skip confirmation prompts.
- --defaults
- Use default options.
- --registry _url_
- npm registry to use.
FAQ
What is the ng-add command used for?
ng add adds npm packages with Angular schematics support to your project. Runs installation and configuration schematics automatically. Part of Angular CLI.
How do I run a basic ng-add example?
Run `ng add [package-name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --skip-confirmation do in ng-add?
Skip confirmation prompts.