Answer the question
In order to leave comments, you need to log in
How to collapse to open each one?
There are many elements:
<button type="button" class="btn btn-primary" (click)="isCollapsed = !isCollapsed"
[attr.aria-expanded]="!isCollapsed" aria-controls="collapseBasic1">Toggle collapse
</button>
<hr>
<div id="collapseBasic1" [collapse]="isCollapsed">
<div class="well well-lg card card-block card-header">Some content</div>
</div>
<button type="button" class="btn btn-primary" (click)="isCollapsed = !isCollapsed"
[attr.aria-expanded]="!isCollapsed" aria-controls="collapseBasic1">Toggle collapse
</button>
<hr>
<div id="collapseBasic1" [collapse]="isCollapsed">
<div class="well well-lg card card-block card-header">Some content</div>
</div>
Answer the question
In order to leave comments, you need to log in
I found your example and tweaked it a bit.
No need to produce extra variables.
https://stackblitz.com/edit/ngx-bootstrap-collapse...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question