Angular 9 References/ CLI
References

Library generator

This is the documentation for Angular 9.
You can switch to the latest version Angular 10.
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

--lintFix#

When true, applies lint fixes after generating the library.
Type boolean
Default false

--prefix#

The prefix to apply to generated selectors.
Type string
Default lib
Aliases p

--skipInstall#

Skip installing dependency packages.
Type boolean
Default false

--skipPackageJson#

Do not add dependencies to `package.json`.
Type boolean
Default false

--skipTsConfig#

When true, does not update `tsconfig.json` to add a path mapping for the new library. The path mapping is needed to use the library in an app, but can be disabled here to simplify development.
Type boolean
Default false