New to Kendo UI for AngularStart a free 30-day trial

NodeTemplateDirective

Updated on Oct 31, 2025

Represents the template for TreeView nodes (more information and example).

Use this template to customize the content of the nodes. To define the node template, nest an <ng-template> tag with the kendoTreeViewNodeTemplate directive inside a <kendo-treeview> tag.

The template context provides the node data item and its hierarchical index as variables:

  • let-dataItem—The data item for the current node.
  • let-index="index"—The hierarchical index of the current node.
html
<kendo-treeview>
  <ng-template kendoTreeViewNodeTemplate let-dataItem let-index="index">
     <span [style.fontWeight]="dataItem.items ? 'bolder': 'normal' ">
       {{ index }}: {{ dataItem.text }}
     </span>
   </ng-template>
</kendo-treeview>

Selector

[kendoTreeViewNodeTemplate]

In this article
Selector
Not finding the help you need?
Contact Support