Reputation: 83
In my template, I have
<ion-card *ngFor="let item of items">
<p>{{ item.timespan }}</p>
</ion-card>
However, instead of displaying the value inside the loop, I want to bind to it from somewhere else in the template, outside the ngFor loop, like
<h1>{{ timespan }}</h1>
<ion-card *ngFor="let item of items" [timespan]=“item.timespan”>
…
</ion-card>
But I assume I can’t use [timespan] since it is not an input property of ion-card..
So does anyone know how else I can implement this binding?
Any help greatly appreciated.
Upvotes: 1
Views: 2734