I have integrated the angularJS contextMenu module from this source into my application. Now, I am facing an issue with dynamically inserting it within specific HTML tags. Here is what I have tried so far:
e.client.html("<a context-menu=\"menuOptions\">click here</a>");
In my scope, I have declared menuOptions
as follows:
$scope.menuOptions = [
{
text: 'Object-Select',
click: function ($itemScope, $event, modelValue, text, $li) {
$scope.selected = $itemScope.item.name;
}
},
{
text: 'Object-Remove',
click: function ($itemScope, $event, modelValue, text, $li) {
$scope.items.splice($itemScope.$index, 1);
}
}
];
If anyone has a solution or suggestion on how to achieve this functionality successfully, please let me know.