动作在运行时不会触发影响第三时间

时间:2019-06-25 12:15:00

标签: javascript angular angular7 ngrx ngrx-effects

效果在动作的前两个执行中完美运行,但在第三次未触发。Why action doesn't trigger Effect the second time it runs@ngrx Effect does not run the second time中的解决方案对我不起作用。效果如下:

@Effect()
    getRoomsByRoomsList: Observable<IAction>  = this.actions$.pipe(
        ofMap(commonEuropeanParliamentActions.GET_ROOMS_BY_ROOMS_LIST),
        withLatestFrom(this.store, (action, state) => ({state: state, action: action})),
        exhaustMap((pAction: IStateAction) => 
            this.getRooms(pAction).pipe(
                switchMap((entity: any) => [
                    commonEuropeanParliamentActions.getSuccessRoomsByRoomsList(entity),
                    commonEuropeanParliamentActions.getSchedule(entity)
                ]),
                catchError(() => of()),
            )
            ),
    );

1 个答案:

答案 0 :(得分:2)

我也有类似的问题。问题出在我的减速器上。在我的减速器中,发生了一些无法处理的错误,结果该效果停止工作。

如果没有其他解决方案,您能否检查一下您的问题呢?