-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
So long as the menu is not opened I would expect the mat-menu content to not be active (similar to *ngIf="false" directive).
What is the current behavior?
Even if ng-template matMenuContent is used after the menu was opened once and the menu is currently not opened, mat-menu content seems to be active i.e. the components therein seem to be rendered as far as Angular is concerned according to e.g. property getter breakpoints.
What are the steps to reproduce?
Providing a StackBlitz reproduction is the best way to share your issue.
https://stackblitz.com/edit/angular-material2-issue-9dp31o
Couldn't use ng-template matMenuContent here, but even with it in the newer version after opening and closing once content stays active.
What is the use-case or motivation for changing an existing behavior?
Motivation is reducing of unnecessary performance hits (in fact I found that out looking at the Chrome performance devtools).
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.2.0, Material 5.2.0, Windows, TS 2.5.3, Chrome.