Platform: Missing documentation for @ngrx/[email protected]

Created on 5 May 2018  路  7Comments  路  Source: ngrx/platform

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[x] Documentation issue or request

What is the current behavior?


The documentation of schematics is invalid for ngrx v6.x.
I.e. it doesn't show how to correctly wire @ngrx/schematics to @angular/[email protected]

Expected behavior:


It should be possible to run ng add @ngrx/[email protected] or follow a few simple steps in documentation and have @ngrx/schematics wired in angular project.

As a result i.e. ng g entity ... would work. Currently it errors:

Schematic "entity" not found in collection "@schematics/angular".

I expect it will appear in the docs eventually. However it would be incredibly useful to have an update there ASAP. So common folks can start using ngrx with angular-cli v6.x without frustration.

Version of affected browser(s),operating system(s), npm, node and ngrx:

@angular/cli v6.x
@ngrx v6.x

Accepting PRs Docs Schematics

Most helpful comment

FWIW, the config command doesn't use get/set. So, the command to configure the Schematics in angular.json is:

ng config cli.defaultCollection @ngrx/schematics

All 7 comments

Were you able to figure out how to wire it up manually in the meantime?

The command for setting the default schematics has changed to:

ng config set cli.defaultCollection @ngrx/schematics

@brandonroberts Thank you, it works! (set)

Additionally, it seems the ng generate examples are out of date, too. i.e. former

ng g entity User

is now

ng g entity --name=User

ng generate will be the same. After talking to the CLI team, I updated the schemas to work the same way as before. It will be updated in the next beta

FWIW, the config command doesn't use get/set. So, the command to configure the Schematics in angular.json is:

ng config cli.defaultCollection @ngrx/schematics

Correct @blove. Anyone want to submit a PR to fix the command for setting the default?

I'll submit a PR right now.

Was this page helpful?
0 / 5 - 0 ratings