- Notifications
You must be signed in to change notification settings - Fork6
Angular right click and context menu library. No dependencies.
License
zeeshanhyder/angular-right-click
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Angular right click and context menu library. No dependencies.
Copy/move
ng-right-click.js
fromsrc
dir in the package to your project dirIn your Angular app, add a dependency to your module as below:
angular.module('yourApp',['ngRightClick',...]');
In your project dir, type the following command:
$ bower install angular-right-click
Then add a<script>
in your projecthtml
:
<scriptsrc='/bower_components/angular-right-click/src/ng-right-click.js'></script>
And finally in your Angular app, add the dependency as:
angular.module('yourApp',['ngRightClick',...]');
In your project dir, run the following command:
$ npm install angular-right-click
Thenrequire()
in your project source as:
require('angular-right-click')
Import defaultcss
file in your projectindex
file as:
<linkrel="stylesheet"href="[node_modules | bower_components]/angular-right-click/src/css/ng-right-click.css">
<divng-right-click="someFunction()"></div>
In your html file, use the component like this:
<divng-right-clickmenu-items="menuItems"></div>
<divng-right-click="someFunction()"menu-items="menuItems"></div>
where the data format is (in your controller):
$scope.sayHello=function(){//say hello!};$scope.menuItems=[{text:"Menu Item 1",//menu option textdisabled:true//No click event. Grayed out option.},{text:"Menu Item 2",callback:sayHello,//function to be called on clickdisabled:false}];
I have included a defaultcss
file for default styling. Include it in your file. You can easily override it with your customcss
class lie that:
<divng-right-clickmenu-items="menuItems"menu-class="custom-css-class"></div>
Please check the examples directory to get the gist!
Check code examplehere.
About
Angular right click and context menu library. No dependencies.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.