@nx/angular:ngrx-root-store

Adds NgRx support to an application.

Usage

1nx generate ngrx-root-store ... 2

By default, Nx will search for ngrx-root-store in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

1nx g @nx/angular:ngrx-root-store ... 2
Nx 15 and lower use @nrwl/ instead of @nx/

Show what will be generated without writing to disk:

1nx g ngrx-root-store ... --dry-run 2

Options

project

Required
string

The name of the application to generate the NgRx configuration for.

minimal

boolean
Default: true

Only register the root state management setup or also generate a global feature state.

name

string

Name of the NgRx state, such as products or users. Recommended to use the plural form of the name.

addDevTools

boolean
Default: false

Instrument the Store Devtools.

directory

string
Default: +state

The name of the folder used to contain/group the generated NgRx files.

facade

boolean
Default: false

Create a Facade class for the the feature.

route

string
Default: ''

The route that the Standalone NgRx Providers should be added to.

skipImport

boolean
Default: false

Generate NgRx feature files without registering the feature in the NgModule.

skipFormat

Internal
boolean
Default: false

Skip formatting files.

skipPackageJson

Internal
boolean
Default: false

Do not update the package.json with NgRx dependencies.