Reputation: 13
Let's say I have this situation;
<div *ngFor="item of items; let i = index;">
<div *ngIf="variable{{i}}">show if variable{{i}} is true</div>
</div>
And I have defined variables "variable0", "variable1",... How do I access variables in such way using interpolation in *ngIf? I know *ngIf is a separate template, that's why it can't see the "i" variable, but how can I pass it into the *ngIf template and use it?
Upvotes: 1
Views: 1159