I have two objects layers$ and arrayByLayerId$ that I get asynchronously in my component, the structure of the objects is as following :
interface Layer {
id: number;
...
}
{
1: []
2: []
...
}
Is there a way to iterate over arrayByLayerId$ arrays with the async pipe in the template like something below (the syntax is not correct it's just to illustrate what I try to achieve) :
<div *ngFor="let layer of layers$ | async"
[attr.id]="layer.id">
<my-component *ngFor="let array of arrayByLayerId$[layer.id] | async" [array]="array"><my-component/>
</div>
Thanks !
doesn't workmean nothing. Are you sure thatarrayByLayerId$[layer.id] | asyncis actually working?[layer.id]foo$ = combineLatest([layers$, arrayByLayerId$])and thenfoo$ | async