Stream that emits whenever the hovered menu item changes.
()
| 334 | |
| 335 | /** Stream that emits whenever the hovered menu item changes. */ |
| 336 | _hovered(): Observable<MatMenuItem> { |
| 337 | // Coerce the `changes` property because Angular types it as `Observable<any>` |
| 338 | const itemChanges = this._directDescendantItems.changes as Observable<QueryList<MatMenuItem>>; |
| 339 | return itemChanges.pipe( |
| 340 | startWith(this._directDescendantItems), |
| 341 | switchMap(items => merge(...items.map((item: MatMenuItem) => item._hovered))), |
| 342 | ) as Observable<MatMenuItem>; |
| 343 | } |
| 344 | |
| 345 | /* |
| 346 | * Registers a menu item with the menu. |
no outgoing calls
no test coverage detected