ngx-contextmenu icon indicating copy to clipboard operation
ngx-contextmenu copied to clipboard

create a submenu from dynamic context menu

Open LolBruflex opened this issue 6 years ago • 1 comments

hello, can i create a submenu from a dynamic context menu. below an example of the code, thanks

TS public contextMenuActions = [ { html: (item) => 'Open', click: (item) => alert (item.name), enabled: (item) => true, visible: (item) => true, subMenu: 'subMenuColor' },
]; }

HTML

<context-menu #fileMenu> <ng-template contextMenuItem *ngFor="let action of contextMenuActions" [visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider" (execute)="action.click(action.item)" [subMenu]="action.subMenu">

{{ action.html(action.item) }}

<context-menu #subMenuColor> <ng-template contextMenuItem>

LolBruflex avatar Oct 08 '19 11:10 LolBruflex

is there any alternative to this

tarangrathod avatar Jul 27 '22 11:07 tarangrathod