【发布时间】:2020-09-16 19:42:00
【问题描述】:
动作
我有以下操作:
export const searchTM = createAction(
IocActionTypes.SearchTM,
props<{tm: string}>()
);
组件
我的一个组件中有以下代码:
this.store.dispatch(searchTM(value));
其中value 是字符串03F
效果
在我的 ngrx 效果文件中,我有以下内容:
searchTM$ = createEffect(() => this.actions$.pipe(
ofType(iocActions.searchTM),
mergeMap(val => this.iocService.getGridRowByTM(val.tm)
.pipe(
map(rowdataraw => iocActions.searchTMFound({rowdataraw})),
catchError(() => {
return EMPTY;
})
)
)
)
);
但是当我在 mergeMap val 变量上设置调试点时,我看到它是这样出现的:
【问题讨论】:
标签: angular ngrx ngrx-store ngrx-effects