Use the wj-context-menu directive to add context menus to elements
on the page. The wj-context-menu directive is based on the wj-menu
directive; it displays a popup menu when the user performs a context menu
request on an element (usually a right-click).
The wj-context-menu directive is specified as a parameter added to the
element that the context menu applies to. The parameter value is a
CSS selector for the element that contains the menu. For example:
<!-- paragraph with a context menu -->
<p wj-context-menu="#idMenu" >
This paragraph has a context menu.</p>
<!-- define the context menu (hidden and with an id) -->
<wj-menu id="idMenu" ng-show="false">
<wj-menu-item cmd="cmdOpen" cmd-param ="1">Open...</wj-menu-item>
<wj-menu-item cmd="cmdSave" cmd-param="2">Save </wj-menu-item>
<wj-menu-item cmd="cmdSave" cmd-param="3">Save As...</wj-menu-item>
<wj-menu-item cmd="cmdNew" cmd-param ="4">New...</wj-menu-item>
<wj-menu-separator></wj-menu-separator>
<wj-menu-item cmd="cmdExit" cmd-param="5">Exit</wj-menu-item>
</wj-menu >
AngularJS directive for context menus.
Use the wj-context-menu directive to add context menus to elements on the page. The wj-context-menu directive is based on the wj-menu directive; it displays a popup menu when the user performs a context menu request on an element (usually a right-click).
The wj-context-menu directive is specified as a parameter added to the element that the context menu applies to. The parameter value is a CSS selector for the element that contains the menu. For example: