My code is:
return this.creaClienti(cliente)
.pipe(
tap(res => console.log('Cliente ->', res)),
concatMap(res => this.creaIntolleranza(intolleranza)),
tap(res => console.log('Intolleranza ->', res)),
concatMap(res => this.creaSpaziUtilizzati(utilizzoSpazi)),
tap(res => console.log('Utilizzo spazi ->', res)),
concatMap(res => this.creaEvento(evento))
);
}
but this.creaClienti(cliente) is:
creaClienti(clienti: any[]): Observable<any> {
return from(clienti).pipe(
concatMap(cliente => <Observable<any>>this.http.post(environment.baseUrl + 'api/json/node/cliente', cliente, this.httpOptions))
);
}
the problem is that every time a contained call is ended the pipe restarts...
I need to run multiple call lists sequentially, all the functions that are in the concatMap are in fact similar to creaClienti
shareReplay()and multiple subscriptions shouldn't trigger the source Observable..subscribeorayncpipe?