JSPM

ngx-right-click-menu

0.0.6
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q44073F
  • License ISC

Package Exports

  • ngx-right-click-menu

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ngx-right-click-menu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ngx-right-click-menu

ngx-right-click-menu is right click context menu for Angular 2+.

DEMO https://example.com/

Dependencies

"@angular/common": "^7.0.0"

@angular/core": "^7.0.0

Setup

npm i -s ngx-right-click-menu

import NgxRightClickMenuModule

import { NgxRightClickMenuModule } from 'ngx-right-click-menu'

@NgModule({
  //...
  imports: [
  ...
    NgxRightClickMenuModule,
  ...
  ]
  //...
})

Usage

  <div [ngxContextMenu]="menu" class="item">
    Right click here!
  </div>
export class AppComponent {
  public menu = {
    title: 'Simple Menu',
    items: [
      {
        label: 'Menu 1',
        action: this.menuAction,
      },
      {
        label: 'Menu 2',
        action: this.menuAction,
      },
    ],
  }
  public menuAction() {
    console.log('menu clicked!');
  }
}