Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

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.

Aliases: -d

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