Utilizing mat-expansion panel, I have successfully bound the panel title dynamically. Whenever a user clicks on a mat-list item, I need to retrieve the corresponding panel name and display it in another div. Can someone assist me in capturing the active/selected mat-expansion-panel name in TypeScript?
<mat-accordion>
<mat-expansion-panel *ngFor="let templateList of LeftpaneTableDetails first as isFirst" [expanded]="isFirst">
<mat-expansion-panel-header>
<mat-panel-title>
{{templateList.strTemplateName}}
</mat-panel-title>
<mat-panel-description>
</mat-panel-description>
</mat-expansion-panel-header>
<mat-list>
<mat-list-item class="cursor-pointer table-name-list" *ngFor="let table of templateList.tableList" [attr.data-message-tableId]="table.intTableId" (click)="populateTableDetails($event, table.intTableId, table.strTableLabelName, templateList.strTemplateName)">{{table.strTableLabelName}}</mat-list-item>
</mat-list>
</mat-expansion-panel>
</mat-accordion>