A trigger for a menu.
element
HTMLElementA reference to the host element.
textDirection
anyThe directionality (LTR / RTL) context for the application (or a subtree of it).
expanded
anyWhether the menu is expanded.
hasPopup
anyWhether the menu trigger has a popup.
disabled
anyWhether the menu trigger is disabled.
softDisabled
anyWhether the menu trigger is soft disabled.
open
voidOpens the menu focusing on the first menu item.
@returns
voidclose
voidCloses the menu.
@returns
voidDescription
A trigger for a menu.
The ngMenuTrigger directive is used to open and close menus. It can be applied to
any interactive element (e.g., a button) to associate it with a ngMenu instance.
It also supports linking to sub-menus when applied to a ngMenuItem.
<button ngMenuTrigger [menu]="myMenu">Open Menu</button><div ngMenu #myMenu="ngMenu"> <div ngMenuItem>Item 1</div> <div ngMenuItem>Item 2</div></div>
Jump to details