Issue
In this StackBlitz, a context menu is opened if the checkbox is true. But if it is false, it should not open. Any ideas how to achieve the latter?
@Component({
selector: 'my-app',
template: `
<div #target>
Target
</div>
<kendo-contextmenu [target]="target" [items]="items">
</kendo-contextmenu>
Enable context menu <input type="checkbox" [(ngModel)]="open">
`
})
export class AppComponent {
public items: any[] = items;
open = true;
}
Solution
There’s no code on the contextmenu telling it not to display. try adding an *ngIf=”open” to it.