{"id":16433722,"url":"https://github.com/msarsha/angular-rightclick-contextmenu","last_synced_at":"2025-03-23T08:31:46.150Z","repository":{"id":78686493,"uuid":"64608906","full_name":"msarsha/angular-rightclick-contextmenu","owner":"msarsha","description":"Right click context menu for angular 1.5","archived":false,"fork":false,"pushed_at":"2017-03-12T09:57:17.000Z","size":45,"stargazers_count":10,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T18:58:09.000Z","etag":null,"topics":["angular","angularjs","click","context","contextmenu","menu","right"],"latest_commit_sha":null,"homepage":"https://msarsha.github.io/angular-right-click/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msarsha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-31T18:30:34.000Z","updated_at":"2019-10-23T18:45:05.000Z","dependencies_parsed_at":"2023-04-23T13:35:40.683Z","dependency_job_id":null,"html_url":"https://github.com/msarsha/angular-rightclick-contextmenu","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.4838709677419355,"last_synced_commit":"f0469eadcb5667dc322c2a58a468294c5539a2b9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msarsha%2Fangular-rightclick-contextmenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msarsha%2Fangular-rightclick-contextmenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msarsha%2Fangular-rightclick-contextmenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msarsha%2Fangular-rightclick-contextmenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msarsha","download_url":"https://codeload.github.com/msarsha/angular-rightclick-contextmenu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245078067,"owners_count":20557274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angularjs","click","context","contextmenu","menu","right"],"created_at":"2024-10-11T08:47:01.658Z","updated_at":"2025-03-23T08:31:46.130Z","avatar_url":"https://github.com/msarsha.png","language":"JavaScript","readme":"# angular-rightclick-contextmenu\n\n_Right click context menu for angular 1.5_\n\n\n__DEMO:__ https://msarsha.github.io/angular-right-click/\n\n\n## Installation\n\n- `npm install --save right-click-menu`\n\n### Build\nClone the repo and run `npm install` to install dependencies and then `gulp` to build;\n\n\n### How to use:\n\n* Add the `sh-context-menu` directive to the element you wish to enable the context menu functionality.\n* Provide a options array that will contain the context menu objects using the `menu-options` binding.\n* Provide a data context object using the `context-data` binding.\n* Optionally provide a options object\n\n````html\n\u003cdiv sh-context-menu menu-options=\"ctrl.menuOptions\" context-data=\"ctrl.data\" options=\"ctrl.options\"\u003eRight Click Me\u003c/div\u003e\n````\n\n### `options` (v0.0.4)\n`options` should be a key\\value object\n\nSupported options:\n\n`rtl: boolen` -\u003e Right to left support\n\n\n### `menu-options` \n\n`menu-options` should be an Array with the following structure:\n\n````javascript\n[\n    {\n        label: 'Save',        // menu option label\n        onClick: function($event){  // on click handler\n        }   \n    },\n    {\n        label: 'Edit',\n        onClick: function($event){  // on click handler\n        },\n        disabled: function (dataContext) { // disabled handler\n            return true;\n        }\n      },\n      {\n        label: 'Details',\n        onClick: function($event){  // on click handler\n        }   \n      },\n      {\n        divider: true       // will render a divider\n      },\n      {\n        label: 'Remove',\n        onClick: function($event){  // on click handler\n        }   \n      }\n  ]\n````\n\n#### The `onClick` handler\n\nThe `onClick` handler is a function with `$event` parameter.\n\nThe `$event` object will contain the following parameters:\n* `option` object that contain the option the user pressed\n* `dataContext` object that was injected using the `context-data` binding\n\n\n#### The `disabled` handler\n\nThe `disabled` handler is a function with `dataContext` parameter.\n\nThis handler will be injected with the dataContext provided using the `context-data` binding\nand will return true/false to disable the current menu option for the current dataContext\n\n\n\n### `context-data` \n\nThe `context-data` object will be injected into the `onClick` and `disabled` handlers.\n\n\n\n### Examples:\n\nExample can be found under `example/`\n\n\nAnd live demo here: https://msarsha.github.io/angular-right-click/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsarsha%2Fangular-rightclick-contextmenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsarsha%2Fangular-rightclick-contextmenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsarsha%2Fangular-rightclick-contextmenu/lists"}