I am trying to obtain data from a local server using JSON (not JSONP) and display it in a typeahead using Angular UI bootstrap and Angular. I was able to get timeout() and jsonp to work from other examples I found on this site, so I know promises works.
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);
};
When I run this code in a debugger, the return filterFilter line runs. I can see my data in JSON form, but I get lost stepping through the Angular code. Is there something I'm missing?