I am using the solution provided in (Hide/show individual items inside ngFor)
How to set the value of pinMe[j] based on a condition ? I have situation where i need to toggle between the div's but also decide on what to show at first based on a condition. A sample code below for your info.
<ion-card *ngFor="let feed of feeds; let j=index">
<ion-card-header>
<h1 (click)="pinMe[j] = !pinMe[j]">PinnedView</h1>
</ion-card-header>
<ion-card-content>
<div [hidden]="!pinMe[j]"> </div>
<div [hidden]="pinMe[j]"> </div> <!-- (pinMe[j] should change based on a key, so that the first div is shown first [the key would be feed.isPinned = '1'])
</ion-card-content>
</ion-card>
The previous page was not allowing me to post a comment so created this as a new issue.
Thanks in advance!