Hi,
I have a list of packages
I have 2 buttons
button 1 - selects the package and shows which package is selected - GREAT!
button 2 - toggles an ngIf show/hide but shows all content and not the selected package
I would like button 2 to show/hide only the data clicked
<div class="lower-block" (click)="packageSelect(package)">Add Package</div>
<button (click)="toggleCollapse(package)">Show</button>Enter code here...
packageSelect(thispackage: Package): void {
this.selectedPackage = thispackage;
console.log('the selected package is', this.selectedPackage.name);
}
toggleCollapse(thispackage: Package) {
this.isCollapsed = !this.isCollapsed;
}