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