Focuses the menu item.
(origin?: FocusOrigin, options?: FocusOptions)
| 92 | |
| 93 | /** Focuses the menu item. */ |
| 94 | focus(origin?: FocusOrigin, options?: FocusOptions): void { |
| 95 | if (this._focusMonitor && origin) { |
| 96 | this._focusMonitor.focusVia(this._getHostElement(), origin, options); |
| 97 | } else { |
| 98 | this._getHostElement().focus(options); |
| 99 | } |
| 100 | |
| 101 | this._focused.next(this); |
| 102 | } |
| 103 | |
| 104 | ngAfterViewInit() { |
| 105 | if (this._focusMonitor) { |
nothing calls this directly
no test coverage detected