Answer the question
In order to leave comments, you need to log in
How to display the name of the sidebar item in the head panel?
When clicking on the sidebar elements in the headpanel, the name of the element is displayed. I can't output up to 3 list nestings in the headpanel, it only outputs up to 2x.
<a mat-list-item [ngStyle]="{'padding-left': (depth * 12) + 'px'}" (click)="onItemSelected(item)"
[ngClass]="{'active': item.route ? router.isActive(item.route, true): false, 'expanded': expanded}"
class="menu-list-item">
{{item.name}}
<span fxFlex *ngIf="item.childItems && item.childItems.length" >
<span fxFlex></span>
<mat-icon [@indicatorRotate]="expanded ? 'expanded': 'collapsed'">
expand_more
</mat-icon>
</span>
</a>
<div *ngIf="expanded">
<app-sidebar-left *ngFor="let child of item.childItems" [item]="child" [depth]="depth+1" (click)="onItemChange(child)">
</app-sidebar-left>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question