MaterialRadioComponent constructor

MaterialRadioComponent(
  1. HtmlElement _root,
  2. ChangeDetectorRef _changeDetector,
  3. @Host() @Optional() MaterialRadioGroupComponent? _group,
  4. @Self() @Optional() NgControl? cd,
  5. @Attribute('role') String? role,
)

Implementation

MaterialRadioComponent(
    this._root,
    this._changeDetector,
    @Host() @Optional() this._group,
    @Self() @Optional() NgControl? cd,
    @Attribute('role') String? role)
    : this.role = role ?? 'radio',
      super(_root) {
  // When NgControl is present on the host element, the component
  // participates in the Forms API.
  cd?.valueAccessor = this;
}