【发布时间】:2020-05-07 21:02:00
【问题描述】:
我已经使用 NgRX 创建了 Angular 应用程序。我添加了动作、减速器、服务和效果。但是在访问该操作时,组件代码中出现以下错误。
错误:“typeof EmployeeAction”类型上不存在属性“GetEmployees”。
找到下面的代码sn-ps:
在员工组件中:
this.store.dispatch(new EmployeeAction.GetEmployees());
员工操作.ts:
export class GetEmployees implements Action {
readonly type = GET_EMPLOYEES;
}
The entire App code will be available in this Github repository.
https://github.com/techvenky/AngularNgRx/tree/master/src
【问题讨论】:
标签: angular ngrx ngrx-store ngrx-effects