You need to get hold of MatMenuTrigger instance from [matMenuTriggerFor] element
#menuTrigger="matMenuTrigger" [matMenuTriggerFor]="menu"
where
-
#menuTriggeris the template reference variable -
matMenuTriggerisexportAsproperty ofMatMenuTriggermetadata
and then simply call
(click)="menuTrigger.openMenu()"
Stackblitz example
Read more about template reference variable here
- What is #auto attribute here and why it is required