A selectable and expandable item in an ngTree.
element
HTMLElementA reference to the host element.
id
InputSignal<any>A unique identifier for the tree item.
value
InputSignal<V>The value of the tree item.
parent
InputSignal<Tree<V> | TreeItemGroup<V>>The parent tree root or tree item group.
disabled
InputSignalWithTransform<boolean, unknown>Whether the tree item is disabled.
selectable
InputSignal<boolean>Whether the tree item is selectable.
expanded
ModelSignal<boolean>Whether the tree item is expanded.
label
InputSignal<string | undefined>Optional label for typeahead. Defaults to the element's textContent.
searchTerm
Signal<string>Search term for typeahead.
ngOnInit
void@returns
voidngOnDestroy
void@returns
voidDescription
A selectable and expandable item in an ngTree.
The ngTreeItem directive represents an individual node within an ngTree. It can be
selected, expanded (if it has children), and disabled. The parent input establishes
the hierarchical relationship within the tree.
<li ngTreeItem [parent]="parentTreeOrGroup" value="item-id" label="Item Label">
Item Label
</li>
Jump to details