I try to use filter angularjs service in my chrome extension. But i have no idea how to get/inject it in my function. For the moment i have:
chrome.contextMenus.onClicked.addListener(function(info, tab) {
result = $filter('filter')(jsonArray, info.selectionText, function (actual, expected) {
return actual.toString().toLowerCase().indexOf(expected.toLowerCase()) == 0;
});
console.log(sug);
});
But obviously i have: $filter is not defined. I also want to use $http service to get my jsonArray