New to Kendo UI for AngularStart a free 30-day trial

MenuComponent

Component

Definition

Package:@progress/kendo-angular-menu

Selector:kendo-menu

Export Name:Accessible in templates as #kendoMenuInstance="kendoMenu"

Syntax:

ts
_@Component({
   selector: 'my-app',
   template: `
       <kendo-menu [items]="items">
       </kendo-menu>
   `
})
class AppComponent {
   public items: any[] = [{ text: 'item1', items: [{ text: 'item1.1' }] }, { text: 'item2', disabled: true }];
}

Inputs

Sets the Menu animation.

Default:

true

appendTo

ViewContainerRef

Defines the container to which the popups will be appended.

Specifies the delay in milliseconds before the Menu items are opened or closed on item hover or leave (see example). Used to avoid the accidental opening or closing of the items.

Default:

100

items

any[]

Specifies the Menu items.

Specifies that the root items can be opened only on click (see example).

Default:

false

Configures the popup settings for the Menu items. Allows customization of the popup class and margin.

Sets the Menu size.

The possible values are:

  • small
  • medium
  • large
Default:

undefined

Defines a function that determines how to track changes for the menu items. By default, the component tracks changes by index.

Default:

defaultTrackBy

vertical

boolean

Specifies if the Menu will be vertical (see example).

Default:

false

Events

Fires when a Menu item is closed (see example).

Fires when a Menu item is opened (see example).

Fires when a Menu item is selected (see example).

Methods

Opens or closes the specified Menu items.

Parameters:openboolean

A Boolean value which indicates if the items will be opened or closed.

indicesstring[]

One or more values which represent the hierarchical indices of the items that will be opened or closed.