ng add
Adds support for an external library to your project.
ng add <collection>
Description
Adds the npm package for a published library to your workspace, and configures the project in the current working directory to use that library, as specified by the library's schematic. For example, adding @angular/pwa
configures your project for PWA support:
ng add @angular/pwa
Arguments
Argument | Description | Value Type |
---|---|---|
collection |
The package to be added. |
string |
Options
Option | Description | Value Type | Default Value |
---|---|---|---|
--defaults |
Disable interactive input prompts for options with a default. |
boolean |
false |
--dry-run |
Run through and reports activity without writing out results. |
boolean |
false |
--force |
Force overwriting of existing files. |
boolean |
false |
--help |
Shows a help message for this command in the console. |
boolean |
|
--interactive |
Enable interactive input prompts. |
boolean |
true |
--registry |
The NPM registry to use. |
string |
|
--skip-confirmation |
Skip asking a confirmation prompt before installing and executing the package. Ensure package name is correct prior to using this option. |
boolean |
false |
--verbose |
Display additional details about internal operations during execution. |
boolean |
false |
© 2010–2022 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/cli/add