MCPcopy Create free account
hub / github.com/angular/components / constructor

Method constructor

src/material/radio/radio.ts:597–610  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected