我有一种情况,我想在第三级操作中访问操作有效负载。我可以在 lettable 操作符中做这样的事情,但是我怎么能用 pipeable 操作符做同样的事情呢?
这是我的代码,
@Effect()
onTrySignin = this.actions$.pipe(
ofType(AuthActions.TRY_SIGNIN),
map((action: AuthActions.TrySignin) => {
return action.payload;
}),
switchMap(action => {
return this.httpService
.postRequest('UserAccounts/Login', action.credentials);
}), catchError((error: HttpErrorResponse) => {
return Observable.of(new AuthActions.FailedAuth(error));
}),
mergeMap((response: any) => {
// how to access action payload here?
})
);