constructor(
private route: ActivatedRoute,
private http: Http
){
// Observe parameter changes
let paramObs = route.paramMap;
// Fetch data once
let dataObs = http.get('...');
// Subscribe to both observables,
// use both resolved values at the same level
}
Is there something similar to forkJoin that triggers whenever a parameter change is emitted? forkJoin only works when all observables have completed.
I just need to avoid callback hell, any alternative that complies is welcome.