popover自定义指令中的highlight自定义指令在angularjs中不起作用
directive('customApmPop', ['$compile',function ($compile) {
return {
restrict: 'A',
template: '<a class="tablea" highlight=\'\' >{{trimmed}}</a>',
scope : true ,
link: function (scope, el, attrs) {
scope.trimmed = attrs.popoverLabel;
scope.contents = '<div highlight=\'\'>'+attrs.popoverHtml+'</div>';
$(el).popover({
trigger: 'hover',
html: true,
content: scope.contents,
// template: '<div highlight=\'\'>{{contents}}</div>',
placement: attrs.popoverPlacement
});
}
};
return directive;
}]);