Focuses the menu item.
(origin?: FocusOrigin, options?: FocusOptions)
| 81 | |
| 82 | /** Focuses the menu item. */ |
| 83 | focus(origin?: FocusOrigin, options?: FocusOptions): void { |
| 84 | if (this._focusMonitor && origin) { |
| 85 | this._focusMonitor.focusVia(this._getHostElement(), origin, options); |
| 86 | } else { |
| 87 | this._getHostElement().focus(options); |
| 88 | } |
| 89 | |
| 90 | this._focused.next(this); |
| 91 | } |
| 92 | |
| 93 | ngAfterViewInit() { |
| 94 | if (this._focusMonitor) { |
nothing calls this directly
no test coverage detected