Aggregators
// Effect aggregators
@Effect()
aggregator = this.actions$.pipe(
ofType<LoadUserById>(UserActionTypes.LoadUserById),
flatMap(a =>
zip(
this.actions$.pipe(
ofType<LoadUserByIdSuccess>(UserActionTypes.LoadUserByIdSuccess),
first(t => t.payload.id === a.payload.id)
),
this.actions$.pipe(
ofType<Logged>(LogActionTypes.Logged),
first(t => t.payload.id === a.payload.id)
)
)
),
map(pair => new LoadAdminUserSuccess())
);Last updated
Was this helpful?