In the ComponentStore of ngrx, we have two effects.
readonly startAndUpdateProgress = this.effect<void>(
(trigger$) => trigger$.pipe(
exhaustMap(() =>
this.numbersObservable.pipe(
tapResponse({
next: (progress) => this.updateIrisFileListProgress(progress),
error: (error) => console.error(error)
})
)
)
)
);
readonly postFileToServer = this.effect((formData$: Observable<FormData>) => {
return formData$.pipe(
switchMap((formData) => {
return this.schemaUploadSrvice.postFiles(formData).pipe(
tapResponse(
(response) => this.updateSchemaUploadServerResponse(),
(error: HttpErrorResponse) => console.error(error),
)
)}),
);
});
Is there a way to wait for startAndUpdateProgress to complete before calling postFileToServer? I need to perform this synchronously.