问题描述
动作
我将执行以下操作:
requests
组件
export const searchTM = createAction(
IocActionTypes.SearchTM,props<{tm: string}>()
);
其中this.store.dispatch(searchTM(value));
是字符串value
效果
03F
但是当我在mergeMap searchTM$ = createEffect(() => this.actions$.pipe(
ofType(iocActions.searchTM),mergeMap(val => this.iocService.getGridRowByTM(val.tm)
.pipe(
map(rowdataraw => iocActions.searchTMFound({rowdataraw})),catchError(() => {
return EMPTY;
})
)
)
)
);
变量上设置调试点时,我看到它像这样出现:
解决方法
问题是我以错误的格式传递了参数。
我正在使用:
val
我应该一直使用的位置:
this.store.dispatch(searchTM(value));