Seeking assistance with retrieving data from a local server using JSON (not JSONP) and presenting it in a typeahead via Angular UI bootstrap and Angular. Successfully implemented timeout() and jsonp based on examples found, confirming that promises are functioning correctly.
function DepedencyCtrl($scope, $http, $timeout, filterFilter) {
...
$scope.typeahead = function(type, name) {
return $http.get('pulldata', {params: {type: type, name: name}}).success(function(data){
return filterFilter(data, name);
}, 1000);
};
While debugging the code, the line containing return filterFilter executes. JSON data is visible, but navigating through the Angular code becomes confusing. Is there something crucial that I might be overlooking?