menu/src/menu-link/menu-link.component.ts
MenuLink is a container for links in a Menu. It requires a label and can optionally have an icon on the left.
MenuLink can have a router link and/or a callback. The callback will be called before the router link is navigated to. If there is no select callback and no router link the MenuLink will be displayed as disabled.
MenuLink can have an action icon which will be displayed on the right-hand side. The action icon can be displayed as disabled.
Example :<talenra-menu-link label="Menu" routerLink="/menu" />
<talenra-menu-link label="Refresh" icon="ini" [selectCallback]="menuItemSelected" />import { MenuLinkComponent } from '@talenra/components/menu';See MenuComponent
FocusableOption
| changeDetection | ChangeDetectionStrategy.OnPush |
| HostDirectives |
CdkMenuItem
|
| host | { |
| selector | talenra-menu-link |
| imports |
IconComponent
|
| templateUrl | ./menu-link.component.html |
| styleUrl | ./menu-link.component.scss |
Inputs |
| disabled |
Type : boolean
|
|
Whether the MenuLink is disabled. |
| actionIcon |
Type : string
|
|
The action icon of the MenuLink. If a shortcut is provided the actionIcon will be ignored |
| actionIconDisabled |
Type : boolean, unknown
|
Default value : false, { transform: booleanAttribute }
|
|
Whether the action icon is disabled. |
| icon |
Type : string
|
|
The icon of the MenuLink. |
| label |
Type : string
|
| Required : true |
|
The label of the MenuLink. |
| routerLink |
Type : string
|
|
The router link of the MenuLink. |
| selectCallback |
Type : TSelectCallback
|
|
The callback function that is called when the MenuLink is selected. |
| shortcut |
Type : string
|
|
The shortcut of the MenuLink. If a shortcut is provided the actionIcon will be ignored |