Preserve the order of the http calls in angular
I'm trying to solve the order problem I'm facing with several approaches that I found here on SO without a success. I have a method, where I'm loading some data for an array of leaflet layers: private loadSelectedTileLayersCapabilities(): void { let tempTileLayer; this.selectedTileLayerIds.forEach( (selectedTileLayer: string) => { tempTileLayer = this.getTileLayerById(selectedTileLayer); this.capabilitiesService.getTileLayerDimensions(tempTileLayer.url, tempTileLayer.name, tempTileLayer.id) .subscribe( dimensions => this.displayNewTileLayer(dimensions) ); } ); } And then I have a method, where