我有一个效果,在启动应用的时候保存用户的个人资料,但是我需要从后端再次请求它来更新它
loadProfile$ = createEffect(() =>
this.actions$.pipe(
ofType(fromProfileActions.loadProfile),
switchMap(() =>
this.profileService.getProfile().pipe(
map((res: any) => {
return fromProfileActions.loadProfileSuccess({
profile: res,
});
}),
catchError((error) => {
return of(
fromProfileActions.loadProfileFail({
error,
})
);
})
)
)
)
);
如何通过再次向服务器发出相同的请求来更新已保存的数据? 我试图在删除保存的数据后发送动作负载配置文件但不起作用