I have "add location" button, which opens cdkMenu
<button class="btn btn--add" cdkMenuItem [cdkMenuTriggerFor]="locationAdd">
<ng-template #locationAdd>
<div class="menu-panel" cdkMenu></div>
</ng-template>
</button>
Now I want close cdkMenu in my ts file like the right click. I've tried
@ViewChild('locationAdd') locationAdd: CdkContextMenuTrigger;
But it doesnt help.