Gets the portal that should be attached to the overlay.
(menu: MatMenuPanel)
| 466 | |
| 467 | /** Gets the portal that should be attached to the overlay. */ |
| 468 | private _getPortal(menu: MatMenuPanel): TemplatePortal { |
| 469 | // Note that we can avoid this check by keeping the portal on the menu panel. |
| 470 | // While it would be cleaner, we'd have to introduce another required method on |
| 471 | // `MatMenuPanel`, making it harder to consume. |
| 472 | if (!this._portal || this._portal.templateRef !== menu.templateRef) { |
| 473 | this._portal = new TemplatePortal(menu.templateRef, this._viewContainerRef); |
| 474 | } |
| 475 | |
| 476 | return this._portal; |
| 477 | } |
| 478 | |
| 479 | /** |
| 480 | * Determines whether the trigger owns a specific menu panel, at the current point in time. |
nothing calls this directly
no outgoing calls
no test coverage detected