Group that contains children tree items.
API
class TreeItemGroup<V> implements OnInit ,OnDestroy {
readonly element: HTMLElement;
readonly ownedBy: InputSignal<TreeItem<V>>;
}
element
HTMLElementA reference to the host element.
ownedBy
InputSignal<TreeItem<V>>Tree item that owns the group.
ngOnInit
void
@returns
void
ngOnDestroy
void
@returns
void
Description
Group that contains children tree items.
The ngTreeItemGroup structural directive should be applied to an ng-template that wraps the child ngTreeItem elements. It is used to define a group of children for an expandable ngTreeItem. The ownedBy input links the group to its parent ngTreeItem.
<li ngTreeItem [value]="'parent-id'">
Parent Item
<ul role="group">
<ng-template ngTreeItemGroup [ownedBy]="parentTreeItemRef">
<li ngTreeItem [value]="'child-id'">Child Item</li>
</ng-template>
</ul>
</li>