How to make an Ionic Collapse?

Asked

Viewed 617 times

3

I’m trying to make a collapse and it’s like this:

HTML

<ion-content>

{{topical.}}

<ion-item *ngFor="let aulas of topicos.get_classes" [hidden]="deixainvisivel" menuClose ion-item (click)="openClass(aulas.id)">{{aulas.name}} <b>{{aulas.time}}</b></ion-item>

TS

  Collapse(id){
console.log(id)
this.idtopic = id;
this.deixainvisivel = !this.deixainvisivel;

}

The problem is that it closes all "topics", I have to find a way to close only those who have the ID of the item Divider

  • Try this article: https://www.joshmorony.com/creating-an-accordion-list-in-ionic/

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.