Library generator

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

Generate a library project for Angular.

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

skipTsConfig#

Do not update tsconfig.json for development experience.

Type boolean
Default false