I'm facing a challenge with my dynamic list created using ngFor. What I want is to expand the list for a specific item when clicked, instead of expanding all items in the list. The issue is that currently, every item expands when I click on one. I understand why this is happening but struggling to find a solution.
Below is my code snippet:
<ul *ngFor="let p of portList">
<li (click)="setONUList(p.name)" id="{{ p.name }}"><img src="app/resources/{{ p['oper-status'] }}.png" class="myimage"/>{{ p.name}}</li>
<ol *ngFor="let onu of portONUList">
<li><img src="app/resources/{{ onu['oper-status'] }}.png" class="myimage" />{{ onu.name}}</li>
</ol>
</ul>
I would greatly appreciate any suggestions on how to tackle this problem.