We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b00d4d0 commit 33e08b0Copy full SHA for 33e08b0
README.md
@@ -146,6 +146,18 @@ export class MyContextMenuClass {
146
}
147
```
148
149
+## Triggering the Context Menu with a Different Event
150
+The context menu can be triggered at any point using the method above. For instance, to trigger the context menu
151
+with a left click instead of a right click, use this html:
152
+
153
+```html
154
+<ul>
155
+ <li *ngFor="item in items" (click)="onContextMenu($event, item)">Left Click: {{item.name}}</li>
156
+</ul>
157
+```
158
159
+This could be `(keydown)`, `(mouseover)`, or `(myCustomEvent)` as well.
160
161
## Custom Styles
162
163
The html that is generated for the context menu looks like this:
0 commit comments