Ion-item self.parentView.parentView.context.Show is not a function


#1
i want to open sub menu under menu. but it is giving error. on first button it is fine but when i click on second it is giving error

Html
[code]

Detail 2

<ion-item padding *ngFor=“let d of data” (click)=“toggleDetails1(d)” class=“product”><ion-icon color=“primary” item-right [name]=“d.iconp”>
{{d.Product}}
<div *ngIf=“d.showType”>
<ion-item padding class=“type” (click)=“Show(d)” ><ion-icon color=“primary” item-right [name]=“d.icont”>
{{d.Type}}

  <div *ngIf="d.showDetails"><br> <h1>{{d.Flavour}}{{d.Qty}}      </h1>

     <button ion-button >Add</button></div>
      </ion-item>
</div>
</ion-item>
[/code] TS [code] toggleDetails1(data) { if (data.showType) { data.showType = false; data.iconp = 'ios-add-circle-outline'; } else { data.showType = true; data.iconp = 'ios-remove-circle-outline'; } } show(data){ if (data.showDetails) { console.log(data.showDetails); data.showDetails = false; data.icont = 'ios-add-circle-outline'; } else { console.log(data.showDetails);
    data.showDetails = true;
    data.icont = 'ios-remove-circle-outline';
}

}

[/code]