A list of menu items.
element
HTMLElementA reference to the host element.
textDirection
anyThe directionality (LTR / RTL) context for the application (or a subtree of it).
id
anyThe unique ID of the menu.
wrap
anyWhether the menu should wrap its items.
typeaheadDelay
anyThe delay in milliseconds before the typeahead buffer is cleared.
disabled
anyWhether the menu is disabled.
parent
anyA reference to the parent menu item or menu trigger.
visible
anyWhether the menu is visible.
tabIndex
anyThe tab index of the menu.
onSelect
anyA callback function triggered when a menu item is selected.
expansionDelay
anyThe delay in milliseconds before expanding sub-menus on hover.
close
voidCloses the menu.
@returns
voidDescription
A list of menu items.
A ngMenu is used to offer a list of menu item choices to users. Menus can be nested
within other menus to create sub-menus. It works in conjunction with ngMenuTrigger
and ngMenuItem directives.
<button ngMenuTrigger [menu]="myMenu">Options</button><div ngMenu #myMenu="ngMenu"> <div ngMenuItem>Star</div> <div ngMenuItem>Edit</div> <div ngMenuItem [submenu]="subMenu">More</div></div><div ngMenu #subMenu="ngMenu"> <div ngMenuItem>Sub Item 1</div> <div ngMenuItem>Sub Item 2</div></div>
Jump to details