LabelDirective
Represents the Kendo UI Label directive.
It associates a focusable Angular component or HTML element with a label
tag by using the [for]
property binding.
To associate a component by using the label
element, either:
- Set the
[for]
property binding to a template reference variable, or - Set the
[for]
property binding to anid
HTML string value.
@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
for string | { focus: Function; }
Sets the focusable target either as:
- A template reference variable, or
- An
id
HTML string value.