I have a accordian menu.when i click on accordion menu expand all menu item.but i want open only specific one.
below my code:
shownGroup = null;
toggleGroup(group) {
if (this.isGroupShown(group)) {
this.shownGroup = null;
} else {
this.shownGroup = group;
}
};
isGroupShown(group) {
return this.shownGroup === group;
};
Also Html are given below
<ion-item *ngFor=“let item of userprofileproperties;let i=index” text-wrap (click)=“toggleGroup(i)” [ngClass]="{active: isGroupShown(i)} ">
{{item.property_name}}
<h3>
Specification
<ion-icon color="success" item-right [name]="isGroupShown(i) ? 'arrow-dropdown' : 'arrow-dropright'"></ion-icon>
</h3>
<div *ngIf="isGroupShown(i)">{{item.sbu_area}}</div>
this is my screen shot below