I'm trying to use ngrx-schematics within an Ionic 4 project, but I can't seem to make it work.
Just started an Ionic 4 project and installed ngrx store, entity, effects and schematics. I also have globally installed angular-cli 8, although Ionic still uses version 7. I found on the web ways to make ngrx-schematics work with Ionic 3 by creating a angular-cli.json
file with some configuration. I think that, since Angular 6, that file no longer exists on angular projects, so I didn't create it.
I ran the command ng config schematics.colection @ngrx/schematics
so I could integrate angular schematics with ngrx schematics.
Unfortunately, it didn't work, because when I tried to create a store with the command ng g store State --root --module app.module.ts
I get the following error: Error: Schematic "store" not found in collection "@ionic/angular-toolkit".
The Angular CLI uses schematics to apply transforms to a web-app project. You can modify these schematics, and define new ones to do things like update your code to fix breaking changes in a dependency, for example, or to add a new configuration option or framework to an existing project.
The new way of adding schematics(here ngrx/schematics) would be ng config cli.defaultCollection @ngrx/schematics
. Here is the reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With