【发布时间】:2019-11-13 06:39:22
【问题描述】:
我正在创建新的 Web 仪表板并使用 ngrx/store 在 Angular 7 中加载和数据。大约第三次我正在为不同的商店界面创建和生成文件,并且它似乎不会在这里停止。所以我想知道是否有一些 cli 包可以在一个命令行中为模块创建存储。
我每次都最好使用 cli 来创建动作、效果、减速器、状态。我尝试了一些来自 cli 的解决方案,但它只创建了 reducer 和 index.ts。
npm install @ngrx/schematics --save-dev
npm install @ngrx/{store,effects,entity,store-devtools} --save
ng config cli.defaultCollection @ngrx/schematics
ng generate @ngrx/schematics:store State --root --module some-app.module.ts -d
【问题讨论】:
标签: angular command-line-interface store ngrx