@nx/angular:ngrx-feature-store

Add an NgRx Feature Store to an application or library.

Usage

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

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

You can specify the collection explicitly as follows:

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

Show what will be generated without writing to disk:

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

Options

name

Required
string

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

minimal

boolean
Default: false

Only register the feature state.

parent

string

The path to the file where the state will be registered. For NgModule usage, this will be your Feature Module. For Standalone API usage, this will be your Routes definition file for your feature state. The host directory will create/use the new state directory.

barrels

boolean
Default: false

Use barrels to re-export actions, state and selectors.

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.