| 595 | private _injector = inject(Injector); |
| 596 | |
| 597 | constructor() { |
| 598 | inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader); |
| 599 | const radioGroup = inject<MatRadioGroup>(MAT_RADIO_GROUP, {optional: true})!; |
| 600 | const tabIndex = inject(new HostAttributeToken('tabindex'), {optional: true}); |
| 601 | |
| 602 | // Assertions. Ideally these should be stripped out by the compiler. |
| 603 | // TODO(jelbourn): Assert that there's no name binding AND a parent radio group. |
| 604 | this.radioGroup = radioGroup; |
| 605 | this._disabledInteractive = this._defaultOptions?.disabledInteractive ?? false; |
| 606 | |
| 607 | if (tabIndex) { |
| 608 | this.tabIndex = numberAttribute(tabIndex, 0); |
| 609 | } |
| 610 | } |
| 611 | |
| 612 | /** Focuses the radio button. */ |
| 613 | focus(options?: FocusOptions, origin?: FocusOrigin): void { |