In Angular 9, why are my subscriptions getting loaded sequentially instead of in parallel?
问题 I'm using Angular 9. I want to load a series of objects, each of which has image data. I would like to load all the objects, first, and then load the image data after. I have this in my component.ts file ngOnInit ... ngOnInit(): void { this.authService.getAllinLibrary().subscribe((res: any[]) => { this.results = res; ... for (let i = 0; i < results.length; i++) { this.getTheImage(res[i].Id, i); } }); getTheImage(imageId: number, index: number) { this.authService.getPersonImage(imageId)