isaacplmann / ngx-contextmenu

An Angular component to show a context menu on an arbitrary component
MIT License
248 stars 91 forks source link

Open menu on simple click #130

Closed mrjohnr closed 6 years ago

mrjohnr commented 6 years ago

Hi.it is possible to open contextmenu on simple click on a element? thanks

mrjohnr commented 6 years ago

found it on documentation:

Triggering the Context Menu with a Different Event The context menu can be triggered at any point using the method above. For instance, to trigger the context menu with a left click instead of a right click, use this html:

<ul>
    <li *ngFor="let item of items" (click)="onContextMenu($event, item)">Left Click: {{item.name}}</li>
</ul>

This could be (keydown), (mouseover), or (myCustomEvent) as well.

thanks