Library generator

This is the documentation for Angular 8.
You can switch to the latest version Angular 9.
ng generate library [name] [--[argument]=[value]]
ng generate lib

Generate a library project for Angular.

Links & Tutorials

Options

--entryFile#

The path to create the library's public API file.

Type string
Default public_api

--prefix#

The prefix to apply to generated selectors.

Type string
Default lib
Aliases p

--skipPackageJson#

Do not add dependencies to package.json.

Type boolean
Default false

--skipInstall#

Skip installing dependency packages.

Type boolean
Default false

--skipTsConfig#

Do not update tsconfig.json for development experience.

Type boolean
Default false