2024-12-18 11:59:52 +01:00
|
|
|
@if ($employees | async; as employees) {
|
|
|
|
<mat-tree #tree [dataSource]="employees" [childrenAccessor]="childrenAccessor">
|
|
|
|
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding>
|
|
|
|
{{ node.firstName }}
|
|
|
|
@if (tree.isExpanded(node)) {
|
|
|
|
<button mat-icon-button matTreeNodeToggle [attr.aria-label]="'Toggle ' + node.id">
|
|
|
|
<mat-icon>expand_more</mat-icon>
|
|
|
|
</button>
|
|
|
|
<ul>
|
|
|
|
@for (entry of node | keyvalue; track entry) {
|
|
|
|
<li>{{ entry.key }}: <code>{{ entry.value }}</code></li>
|
|
|
|
}
|
|
|
|
</ul>
|
|
|
|
} @else {
|
|
|
|
<button mat-icon-button matTreeNodeToggle [attr.aria-label]="'Toggle ' + node.id">
|
|
|
|
<mat-icon>chevron_right</mat-icon>
|
|
|
|
</button>
|
|
|
|
}
|
|
|
|
</mat-tree-node>
|
|
|
|
</mat-tree>
|
2024-12-18 09:35:34 +01:00
|
|
|
}
|
|
|
|
|
2024-12-18 11:59:52 +01:00
|
|
|
<router-outlet/>
|