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

LabelDirective

Represents the Kendo UI Label directive for Angular. Use the LabelDirective to link a focusable Angular component or HTML element to a <label> tag with the [for] property binding.

To link a component with the label element:

ts
@Component({
selector: 'my-app',
template: `
 <div class="row example-wrapper" style="min-height: 450px;">
   <div class="col-xs-12 col-md-6 example-col">
     <label [for]="datepicker">DatePicker: </label>
     <kendo-datepicker #datepicker></kendo-datepicker>
   </div>

   <div class="col-xs-12 col-md-6 example-col">
     <label for="input">Input: </label>
     <input id="input" />
   </div>
 </div>
`
})
class AppComponent { }

Selector

label[for]

Inputs

NameTypeDefaultDescription

for

string | { focus: Function; }

Sets the focusable target for the label. Accepts a template reference variable or an id HTML string value.

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