I am using this angularJS contextMenu module on my application and I need to insert this inside some HTML tags dynamically. I am trying something like this but it isn't working.
e.client.html("<a context-menu=\"menuOptions\">click here</a>");
I have menuOptionsdeclared on my scope like this:
$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);
}
}
];
Someone know how to do that?