Как-то примерно так
<button
type="button"
class="btn btn-primary"
(click)="panels.panel1 = !panels.panel1"
[attr.aria-expanded]="!panels.panel1"
aria-controls="collapseBasic1"
>
Toggle collapse
</button>
<hr />
<div id="collapseBasic1" [collapse]="panels.panel1">
<div class="well well-lg card card-block card-header">Some content</div>
</div>
<button
type="button"
class="btn btn-primary"
(click)="panels.panel2 = !panels.panel2"
[attr.aria-expanded]="!panels.panel2"
aria-controls="collapseBasic1"
>
Toggle collapse
</button>
<hr />
<div id="collapseBasic1" [collapse]="panels.panel2">
<div class="well well-lg card card-block card-header">Some content</div>
</div>
// panels.component.ts
export class PanelsComponent {
public panels: { [panelName: string]: boolean } = {
panel1: false,
panel2: false
}
}