我使用以下命令安装 ngrx/store:
ng add @ngrx/store
然后我想添加商店ng generate store auth/Auth --module auth.module.ts
得到以下错误:An unhandled exception occurred: Schematic "store" not found in collection "@schematics/angular". See "xxx\angular-errors.log" for further details.
最佳答案
因为 ngrx 不是直接的 Angular 示意图。 Ngrx 是一个外部库,它支持向 angular 项目添加文件或创建文件
您应该从 ngrx 原理图 json 文件生成商店文件,为此您应该运行如下命令
ng generate @ngrx/schematics:store State --root --module app.module.ts
您可以在此处找到其用法的详细文档:enter link description here
关于angular - 在集合 "store"中找不到示意图 "@schematics/angular",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62725724/