getVerbosePackages(ids: (string|number)[]): Observable<Package[]> {
return forkJoin(ids => ids.map(id => this.packageService.getPackage(id)))
}
packages = this.getVerbosePackages(this.ids);
getPackagesData(packages: Package[]): void {
return forkJoin(
packages.map(pack => this.experimentService.getLastExperimentVerbose(pack.questionnaire.id))
)
}
packagesData = this.packages.pipe(
switchMap(packages => this.getPackagesData(packages))
)
<div *ngFor="let packageData of packagesData | async">
</div>