[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Feature request
[x] Documentation issue or request
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]
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.
@angular/cli v6.x
@ngrx v6.x
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.
Most helpful comment
FWIW, the config command doesn't use get/set. So, the command to configure the Schematics in angular.json is: