Hi,
I want to build a page with some listed documents and provide some meta information if clicked on them. My idea was to implement that via the collapse feature in the following way with NgFor:
`
<div class="panel-heading" (click)="isCollapsed = !isCollapsed">
tbd
</div>
<div (collapsed)="collapsed($event)"
(expanded)="expanded($event)"
[collapse]="isCollapsed"
class="card card-block card-header">
tbd
</div>
</div> `
However, the problem is now that if I click on one panel-heading all collapse divs are opened and for closing vice versa. Is there a way to specify the collapse just for one single panel-heading?
Thanks!
Looks like you need to use tabs?
No tabs was wrong... however Accordion was the one I searched for... Didn't think of that. Cheers mate!
Cheers :)
How you are implementing accordion for this above example ? Can you please tell me. I am having same situation .
I have same problem.
This works for me
For example:
If you have some ngFor="let object of objects"
you can add some boolean property ("collapsed") on object model, and implement collapse like



This worked for me
Most helpful comment
I have same problem.

This works for me
For example:
If you have some ngFor="let object of objects"
you can add some boolean property ("collapsed") on object model, and implement collapse like