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

Method focus

src/material/radio/radio.ts:613–619  ·  view source on GitHub ↗

Focuses the radio button.

(options?: FocusOptions, origin?: FocusOrigin)

Source from the content-addressed store, hash-verified

611
612 /** Focuses the radio button. */
613 focus(options?: FocusOptions, origin?: FocusOrigin): void {
614 if (origin) {
615 this._focusMonitor.focusVia(this._inputElement, origin, options);
616 } else {
617 this._inputElement.nativeElement.focus(options);
618 }
619 }
620
621 /**
622 * Marks the radio button as needing checking for change detection.

Callers

nothing calls this directly

Calls 2

focusViaMethod · 0.80
focusMethod · 0.65

Tested by

no test coverage detected