All Components

Items

You can instantiate the ContextMenu items by initializing them as MenuItem components and use their corresponding properties.

The ContextMenu supports the same item options which are supported by the Menu component.

import { Component } from '@angular/core';

  @Component({
      selector: 'my-app',
      template: `
          <div #target>
           Target
          </div>
          <kendo-contextmenu [target]="target">
               <kendo-menu-item text="Item1">
                   <kendo-menu-item text="Item1.1">
                   </kendo-menu-item>
                   <kendo-menu-item text="Item1.2">
                   </kendo-menu-item>
               </kendo-menu-item>
               <kendo-menu-item [separator]="true">
               </kendo-menu-item>
               <kendo-menu-item text="Item2">
               </kendo-menu-item>
          </kendo-contextmenu>
      `
  })
  class AppComponent {
  }
In this article