Including the angular element like ng-click on the dropdown
kovurivinay opened this issue · 0 comments
kovurivinay commented
the renderItem returns certain elements to populate in the dropdown. How to include ng-click in each element of that dropdown? This is not working as it's not being compiled into a angular DOM.
Can you provide me a solution?
`$("#cmd-input").autoComplete({
minChars: 1,
delay: 5,
cache:false,
source: function(term, suggest){
var autoComplete = //code to get options
var matches = autoComplete.choices;
suggest(matches);
},
renderItem: function (item, search) {
var re = new RegExp("(" + search.replace(/[-/\$^*+?.()|[]{}]/g, '\$&').split(' ').join('|') + ")", "gi");
How to include and implement angular event handlers like ng-click in the below ret element
var ret = '<div data-toggle="tooltip" data-placement="bottom" title="' + item.text + '" class="autocomplete-suggestion" data-val="' + item.text + '">'+
'<div style="float:left" ');
ret += "</div>"
return ret;
}
});`