{ "id": "cli/add", "title": "ng add", "contents": "\n
\n
\n mode_edit\n code\n
\n \n\n\n
\n \n CLI\n
\n\n \n
\n

ng addlink

\n
\n\n\n \n\n
\n \n

Adds support for an external library to your project.

\n\n \nng add <collection> [options]\n\n\n\n \n

\n \n Description\n

\n

Adds the npm package for a published library to your workspace, and configures\nthe project in the current working directory (or the default project if you are\nnot in a project directory) to use that library, as specified by the library's schematic.\nFor example, adding @angular/pwa configures your project for PWA support:

\n\nng add @angular/pwa\n\n

The default project is the value of defaultProject in angular.json.

\n\n \n\n \n\n

Arguments

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ArgumentDescriptionValue Type
<collection>\n

The package to be added.

\n\n \n
string
\n\n\n \n\n

Options

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
OptionDescriptionValue TypeDefault Value
\n --defaults\n \n \n

Disable interactive input prompts for options with a default.

\n\n \n
boolean
\n --help\n \n \n

Shows a help message for this command in the console.

\n\n \n
true|false|json|JSONfalse
\n --interactive\n \n \n

Enable interactive input prompts.

\n\n \n
boolean
\n --registry\n \n \n

The NPM registry to use.

\n\n \n
string
\n --skip-confirmation\n \n \n

Skip asking a confirmation prompt before installing and executing the package. Ensure package name is correct prior to using this option.

\n\n \n
booleanfalse
\n --verbose\n \n \n

Display additional details about internal operations during execution.

\n\n \n
booleanfalse
\n\n\n \n
\n
\n\n\n" }