New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng-context-menu-legacy

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-context-menu-legacy

An AngularJS directive to display a context menu when a right-click event is triggered

  • 0.0.7
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
64
increased by20.75%
Maintainers
1
Weekly downloads
 
Created
Source

ng-context-menu

An AngularJS directive to display a context menu when a right-click event is triggered

Step 1: Install ng-context-menu

Install using Bower:

bower install ng-context-menu --save

Include ng-context-menu.min.js in your app.

Step 2: Load the ng-context-menu module
var app = angular.module('menu-demo', ['ngRoute', 'ng-context-menu'])
Step 3: Add the context-menu directive to a DOM element
<div context-menu class="panel panel-default" data-target="myMenu"
     ng-class="{ 'highlight': highlight, 'expanded' : expanded }">
  ...
</div>

Note: The position of the dropdown menu can get a little out of whack if you place the dropdown menu in a container with padding/margin/etc so it's best to place it as a direct child of the body element as is shown in this example.

Disabling the contextmenu

If you need to disable the contextmenu in certain circumstances, you can add an expression to the context-menu-disabled attribute. If the expression evaluates to true, the contextmenu will be disabled, for example, context-menu-disabled="1 === 1"

That's it, I hope you find this useful!

«–– Ian

Keywords

FAQs

Package last updated on 26 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc