### File

`packages/ecl/components/ecl-menu/ecl-menu-mega/ecl-menu-mega-item.component.ts`

### Description

This component represents a sub-menu item, that is on the second level of the ecl-menu. Adds some custom styling and functionality.

### Extends

`ECLBaseDirective`

### Implements

`EclMenuItem` `AfterViewInit`

### Metadata

selector | `ecl-menu-mega-item`
imports | `NgTemplateOutlet` `RouterLink`
styles | `:host { display: list-item; }`
templateUrl | `./ecl-menu-mega-item.component.html`

### Index

###### Properties
children cmpClass hasChildren iconComponents isExpanded links megaMenuLink role
###### Methods
onFocus onHostClick onItemClick onKeydown getCssClasses
###### Inputs
href id isCurrent isSeeAll label linkExtraAttributes queryParams queryParamsHandling routerLink target class e2eAttr tabindex
###### Outputs
menuItemKeydown menuItemSelect
###### HostBindings
attr.role class.ecl-menu__subitem
###### HostListeners
click
###### Accessors
ariaCurrent

### Constructor

`constructor(renderer: Renderer2)`
Parameters :
Name | Type | Optional
renderer | `Renderer2` | No

### Inputs

href
Type : `string`
Default value : `''`

id
Type : `string`

isCurrent
Type : `boolean`
Default value : `false`

isSeeAll
Type : `boolean`
Default value : `false`
An additional item, that represents a link.

label
Type : `string`

linkExtraAttributes
Type : `literal type`

queryParams
Type : `Params | null`
Default value : `null`

queryParamsHandling
Type : `QueryParamsHandling`
Default value : `null`

routerLink
Type : `string | any[]`
Default value : `null`

target
Type : `string`
Default value : `''`

class
Type : `string`

e2eAttr
Type : `any`

tabindex
Type : `number`

### Outputs

menuItemKeydown
Type : `EventEmitter`

menuItemSelect
Type : `EventEmitter`

### HostBindings

attr.role
Type : `string`
Default value : `'listitem'`
The default role of the DOM element is 'listitem', should not be changed.

class.ecl-menu__subitem
Type : `boolean`
Default value : `true`

### HostListeners

click
Arguments : `'$event'`
`click(evt: MouseEvent)`

### Methods

onFocus
`onFocus()`
Focus should be set on the underlying element. Returns : `void`

onHostClick
`onHostClick(evt: MouseEvent)`
Decorators : `@HostListener('click', ['$event'])`
Parameters :
Name | Type | Optional
evt | `MouseEvent` | No
Returns : `void`

onItemClick
`onItemClick(evt: Event)`
Parameters :
Name | Type | Optional | Description
evt | `Event` | No | This event is emited, when the menu item is clicked.
Returns : `void`

onKeydown
`onKeydown(evt: Event)`
Parameters :
Name | Type | Optional
evt | `Event` | No
Returns : `void`

getCssClasses
`getCssClasses(rootClass: string)`
Parameters :
Name | Type | Optional
rootClass | `string` | No
Returns : `string`

### Properties

children
Type : `Array<EclMenuItem>`
Default value : `[]`

cmpClass
Default value : `true`
Decorators : `@HostBinding('class.ecl-menu__subitem')`

hasChildren
Default value : `false`

iconComponents
Type : `QueryList<EclIconComponent>`
Decorators : `@ContentChildren(undefined)`
If menu item includes any icon, added by the user (for example for 'external' link).

isExpanded
Default value : `true`

links
Type : `QueryList<EclLinkDirective>`
Decorators : `@ContentChildren(undefined)`
If menu item includes any links, added by the user.

megaMenuLink
Type : `ElementRef`
Decorators : `@ViewChild('megaMenuLink')`
The actual link of the menu item.

role
Type : `string`
Default value : `'listitem'`
Decorators : `@HostBinding('attr.role')`
The default role of the DOM element is 'listitem', should not be changed.

### Accessors

ariaCurrent
get `ariaCurrent()`
When the item is the current active item, the 'aria-current' attribute is set to 'page'. Returns : `string | null`

# results matching ""

# No results matching ""