0
이 응용 프로그램에이 angularJS contextMenu 모듈을 사용하고 있으며이를 일부 HTML 태그 안에 동적으로 삽입해야합니다. 이런 식으로 노력하고 있지만 작동하지 않습니다.HTML 태그에 angularJS contextMenu를 동적으로 삽입하십시오.
e.client.html("<a context-menu=\"menuOptions\">click here</a>");
나는 이런 내 범위에 menuOptions
를 선언 한 :
$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);
}
}
];
누군가가 그 작업을 수행하는 방법을 알아?
작동합니다. 고마워요! –
당신은 환영합니다 :) – scipper