ng add

Adds support for an external library to your project.

ng add <collection> [options]
      ng add <collection> [options]


Adds the npm package for a published library to your workspace, and configures your default app project to use that library, in whatever way is specified by the library's schematic. For example, adding @angular/pwa configures your project for PWA support.

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



The package to be added.



When true, disables interactive input prompts for options with a default.

默认值: false


When true, runs through and reports activity without writing out results.

默认值: false

别名: -d


When true, forces overwriting of existing files.

默认值: false

别名: -f


Shows a help message for this command in the console.

默认值: false


When false, disables interactive input prompts.

默认值: false