Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

How to show/hide ion-card-content?

$
0
0

@flavio_b wrote:

Hello,

I was wondering if something similar to this, was possible in case of a list. I wanted to hide just the ion-card-content, upon click on ion-card-header if I have a list of cards.

Basically, I have something like this in my html:

<ion-list>
	<ion-card *ngFor="let entry of entries | async; let i = index">
	  <ion-card-header (click)="toggleSection(i)" class="header">
		{{ entry.name }}
	  </ion-card-header>
	  <ion-card-content [hidden]="entry.hidden">
		"some content"
	  </ion-card-content>
	</ion-card>
</ion-list>

The problem is that entry.hidden doesn’t exist in the “entries” (namely, hidden is not a field of entry), so I don’t know how to store this property efficiently for each element of entries to be used to show/hide the ion-card-content.

Any suggestion?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>