Closed RogerMito closed 7 years ago
It's the 5th parameter passed to the onclick handler. See https://github.com/Templarian/ui.bootstrap.contextMenu#callback-parameters
Hello Friend. I've already figured it out. The contents of the context menu are obtained through AJAX calls. However, I can not delay rendering, and whenever I select an item, the menu contents refer to the last selected variable. That is, in order for me to get the correct content for the current item, I must double-click that item. How could you get around this problem?
Thank you.
Hi @RogerMito, in version v1.1 (I'll release this soon), you can now use a Promise as your menuOptions
. So you can just do something like:
$scope.generateOptions = function() {
// something that returns a promise
}
Then in your HTML something like:
<div context-menu="generateOptions()" />
You can opt to point your build to the latest commit to test this out.
Hello. How do I get the selected element after the click event? I have the $ itemScope variable, however I can not get the attributes of the element that was selected from the context menu. Thank you.