Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Support for $http promises in autocomplete #38

Closed
mbenford opened this issue Dec 10, 2013 · 0 comments
Closed

Support for $http promises in autocomplete #38

mbenford opened this issue Dec 10, 2013 · 0 comments

Comments

@mbenford
Copy link
Owner

It would be nice if the autocomplete directive supported $http promises in addition to regular ones, so the following code would work:

$scope.loadItems = function(query) {
    return $http.get('/tags?query?=' + query);
}

Currently some boilerplate code is needed to achieve the same result:

$scope.loadItems = function(query) {
    return $http.get('/tags?query?=' + query).then(function(response) {
        return response.data;
    }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant