* Get the portal to be attached to the overlay which contains the menu. Allows for the menu * content to change dynamically and be reflected in the application.
()
| 151 | * content to change dynamically and be reflected in the application. |
| 152 | */ |
| 153 | protected getMenuContentPortal() { |
| 154 | const hasMenuContentChanged = |
| 155 | this.menuTemplateRef !== this._menuPortal?.templateRef || |
| 156 | this.menuData !== this._menuPortal?.context; |
| 157 | if (this.menuTemplateRef && (!this._menuPortal || hasMenuContentChanged)) { |
| 158 | this._menuPortal = new TemplatePortal( |
| 159 | this.menuTemplateRef, |
| 160 | this.viewContainerRef, |
| 161 | this.menuData, |
| 162 | this._getChildMenuInjector(), |
| 163 | ); |
| 164 | } |
| 165 | |
| 166 | return this._menuPortal; |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * Whether the given element is inside the scope of this trigger's menu stack. |
nothing calls this directly
no outgoing calls
no test coverage detected