L
Size: a a a
L
L
L
VI
AI
L
L
VI
VI
L
L
L
C
@Effect()
getUser = () =>
this.actions$.pipe(
ofType<UserActions>(ActionTypes.RETRIEVE),
switchMap((action: ActionRetrieve) =>
this.service.getUser().pipe(
map((response: any) => new ActionSuccess(response.data)),
catchError(error => of(new ActionError(error))),
takeUntil(
this.actions$.pipe(
ofType<UserActions>(ActionTypes.CANCEL_RETRIEVE)
)
)
)
)
);
C
@Effect()
getUser = () =>
this.actions$.pipe(
ofType<UserActions>(ActionTypes.RETRIEVE),
switchMap((action: ActionRetrieve) =>
this.service.getUser().pipe(
map((response: any) => new ActionSuccess(response.data)),
catchError(error => of(new ActionError(error))),
takeUntil(
this.actions$.pipe(
ofType<UserActions>(ActionTypes.CANCEL_RETRIEVE)
)
)
)
)
);
C
IB