Open LolBruflex opened 5 years ago
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">
</ng-template>
<context-menu #subMenuColor>
is there any alternative to this
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">
<context-menu #subMenuColor>