可以这样尝试:
@Effect()
authSignup$: Observable<AuthActions.All> = this.actions$
.pipe(
ofType<AuthActions.TrySignup>(AuthActions.TRY_SIGNUP),
switchMap((action) => this.httpClient.post('nodejs_backend_route')
.pipe(
map((response) => new AuthActions.SuccessfulSignup(response)),
catchError((error) => of(new AuthActions.FailedSignup(error)))
)
)
);
问题是您没有返回
Action
在您的
map
。我重写了它,给你一个提示,如何使用最新版本的供应商来完成它。