【发布时间】:2020-02-14 03:39:28
【问题描述】:
我在 Angular 项目中执行秋田状态管理时遇到了错误。我只是提供一个简短的答案,以便像我这样的人可以解决这个问题。
Akita 文档和示例中对此没有明确的理解。
export interface ItemState extends EntityState<Item> {}
@StoreConfig({ name: 'items' })
export class ItemsStore extends EntityStore<ItemState> {
constructor() {
super();
}
}
我收到错误: StaticInjectorError(平台:核心)[ItemsService -> ItemsStore]: NullInjectorError: 没有 ItemsStore 的提供者!
它应该可以工作
【问题讨论】: