I have a component that makes some http requests and send the responses to another component. Currently, I'm using Observables and Subjects, every resquest is added in the subject and returns an Observable, and then I subscribe this observable and emit its response. Can someone tell me how to send the responses only after all the requests completes?
Here is a exemple of what I am doing.
requestLine.next(search);
observable = requestLine.mergeMap(search => {
return service.getSearh(search)
})
observable.subscribe(res => {
emitter.next(res);
});
Tks