【发布时间】:2019-12-09 19:21:41
【问题描述】:
我的效果中必须使用带有 5 个以上动作的 ofType。
@Effect()
applyInspectionsFilters$: Observable<Action> = this.actions$.pipe(
ofType(
InspectionsPageActions.applyInspectionsFilters.type,
InspectionsPageActions.clearSelectedInspectionsFilters.type,
InspectionsPageActions.removeSelectedStatusFilter.type,
InspectionsPageActions.removeSelectedAttributeFilter.type,
InspectionsPageActions.removeSelectedUserFilter.type,
InspectionsPageActions.removeNotAssignedUsersFilter.type
),
withLatestFrom(
this.store$.pipe(select(fromInspections.getSelectedInspectionsFilters))
),
switchMap(([action, filters]) =>
...
)
);
当他们的库中参数的最大数量为 5 时,我应该怎么做?
【问题讨论】:
-
你在做什么需要一个效果,这不能在reducer中完成吗?
标签: angular typescript ngrx ngrx-effects