Can anyone help me understand why this is not allowed in the Angular template?
<ng-container *ngIf="pt$ | async as pt">
<componenetOne[color]="pt.products.find(product => product.partKey === this.item.product.partKey).color.value">
</item>
...
<componentTwo[pt]=pt></componentTwo>
</componenetOne>
</ng-container>
It's complaining:
Unresolved variable or type product
I need to have 2 values available to the template:
pt
- color that comes from
{{pt.products.find(product => product.partKey === this.item.product.partKey).color.value}}
pt
comes from an observable, and color comes from the desired product of the array called products that come from pt.
I need to have both because both values will be used in the template.
What's the way to do this?