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

Label Directive

The Label directive can associates a focusable Angular components and HTML elements with a <label> HTML tag by using the for property binding.

To associate a component using Label directive set the [for] property binding:

  • to a template reference variable:

    html
    <label [for]="datepicker">DatePicker: </label>
    <kendo-datepicker #datepicker></kendo-datepicker>
  • to an id HTML string value:

    html
    <label for="input">Input: </label>
    <input id="input" />

The following example demonstrates both approaches in action.

Change Theme
Theme
Loading ...
In this article
Suggested Links
Not finding the help you need?
Contact Support