At the moment I have all 3 requests running in parallel. Now I need to wait for the first one to finish before I fire the other 2 in parallel. This is what I have at the moment:
return Observable
.forkJoin(request1, request2, request3)
.map((successValues: boolean[]) => {
return successValues.every(x => x);
})
.do(success => {
if (success) {
this.store.dispatch({
type: actions.UPDATE_SUCCESS
});
}
});
You should use the
switchMap
operator.