MaterialCheckboxComponent constructor
MaterialCheckboxComponent(
- HtmlElement _root,
- ChangeDetectorRef _changeDetector,
- @Self() @Optional() NgControl? cd,
- @Attribute('tabindex') String? hostTabIndex,
- @Attribute('role') String? role,
Implementation
MaterialCheckboxComponent(
this._root,
this._changeDetector,
@Self() @Optional() NgControl? cd,
@Attribute('tabindex') String? hostTabIndex,
@Attribute('role') String? role)
: _defaultTabIndex = (hostTabIndex != null && hostTabIndex.isNotEmpty)
? hostTabIndex
: '0',
//hostTabIndex.isNotEmpty ?? false ? hostTabIndex : '0',
this.role = role ?? 'checkbox' {
// When NgControl is present on the host element, the component
// participates in the Forms API.
if (cd != null) {
cd.valueAccessor = this;
}
_syncAriaChecked();
}