• Getting Started
  • Components
    • Barcodes
    • Buttons
    • Chartsupdated
    • Conversational UIupdated
    • Data Query
    • Date Inputsupdated
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Filter
    • Gantt
    • Gauges
    • Gridupdated
    • Icons
    • Indicators
    • Inputsupdated
    • Labels
    • Layoutupdated
    • ListBox
    • ListView
    • Map
    • Menus
    • Navigation
    • Notification
    • Pager
    • PDF Export
    • PDFViewer
    • PivotGridupdated
    • Popup
    • ProgressBars
    • Ripple
    • Schedulerupdated
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • ToolBar
    • Tooltips
    • TreeList
    • TreeView
    • Typography
    • Uploads
    • Utilities
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Sample Applications
  • FAQ
  • Troubleshooting
  • Updates
  • Changelogs
New to Kendo UI for Angular? Start a free 30-day trial

ValueTemplateDirective

Renders the selected value of the dropdown. To define the header template, nest an <ng-template> tag with the kendo<ComponentName>ValueTemplate directive inside the component tag.

The template context is set to the current component. To get a reference to the current data item, use the let-dataItem directive.

The ValueTemplate directive can only be used with the DropDownList and DropDownTree components.

@Component({
selector: 'my-app',
template: `
 <kendo-dropdownlist [data]="listItems">
   <ng-template kendoDropDownListValueTemplate let-dataItem>
     <span>{{dataItem}} option</span>
   </ng-template>
 </kendo-dropdownlist>
`
})
class AppComponent {
  public listItems: Array<string> = ["Item 1", "Item 2", "Item 3", "Item 4"];
}

Selector

[kendoDropDownListValueTemplate],[kendoDropDownTreeValueTemplate]

In this article

Not finding the help you need?