• Overview
@angular/aria/menu

An item in a Menu.

API

    
      class MenuItem<V> {}
    
    

element

HTMLElement

A reference to the host element.

id

any

The unique ID of the menu item.

value

any

The value of the menu item.

disabled

any

Whether the menu item is disabled.

searchTerm

any

The search term associated with the menu item.

parent

any

A reference to the parent menu or menubar.

active

any

Whether the menu item is active.

expanded

any

Whether the menu is expanded.

hasPopup

any

Whether the menu item has a popup.

open

void

Opens the submenu focusing on the first menu item.

@returnsvoid

close

void

Closes the submenu.

@returnsvoid

Description

An item in a Menu.

ngMenuItem directives can be used in ngMenu and ngMenuBar to represent a choice or action a user can take. They can also act as triggers for sub-menus.

<div ngMenuItem (onSelect)="doAction()">Action Item</div><div ngMenuItem [submenu]="anotherMenu">Submenu Trigger</div>
Jump to details