Comments (2)
You're right html
should probably be renamed to text
in that example because it won't do any compiling of html.
To allow something to be passive, you'll need to add that to the contextMenuItem
: [passive]="action.passive"
https://github.com/isaacplmann/ngx-contextmenu#dynamic-context-menu
The structure of contextMenuActions
is not dictated by ngx-context-menu
at all, so you could do something like this:
const contextMenuActions = [
{
html: 'Rename to: ',
showInput: true
}
];
<ng-template *ngFor="let action of contextMenuActions" contextMenuItem let-item
[visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider"
[passive]="action.passive" (execute)="action.click($event.item)">
{{ action.html($event.item) }}
<input *ngIf="action.showInput" #rename type="text" (keyup.enter)="onEnter(rename.value)">
</ng-template>
from ngx-contextmenu.
Clever. That worked for me thank you.
-- Thor
from ngx-contextmenu.
Related Issues (20)
- Can't install with Angular 12.0.1 HOT 1
- Support Angular 11 and 12 HOT 1
- Long touch does not trigger in ios mobile devices
- Context menu is not working in Angular 9 HOT 1
- contextMenuService not showing the menus in angular 11 HOT 4
- Unable to render nested submenu
- Contextmenu is broken in Angular 13 HOT 16
- Can't bind to 'subMenu' since it isn't a known property of 'ng-template'.
- Disable the context-menu if the contextMenuSubject is empty or undefined
- Blank context menu issue when there is no context menu to show
- Angular 12
- In bootstrap model popup , context menu is not getting on right click on grid/cell in angular
- Archiving the repo HOT 2
- delay on close
- ngx context menu with filtering ability
- ngx-contextmenu does not support with angular 14. HOT 2
- contextMenu not bind With Html in angular 12.
- Accessibility issue with Context Menu-Confirmation needed HOT 3
- Support for Angular 16 HOT 3
- Default css doesn't work on Angular 7 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-contextmenu.