I create observables from HTTP requests in Angular 2. I want to run a piece of code if all observables complete without error.
Right now I'm using forkJoin to combine my array of observables
Observable.forkJoin(observables)
.subscribe(
success => {
//code
},
error => console.log('error'));
}
The issue I'm having is that forkJoin fires those HTTP-requests again. I already fired them when I created the observable, subscribed to it and put in an array. Is there an equivalent to forkJoin where I can run a piece of code after all observables complete, without firing the HTTP-requests again?