How can i use the autocomplete with an assicronous call?
Example:
$scope.data = [];
list();
function list(){
Service.query(
function(objects){
objects.forEach(function(object){
$scope.data.push(object.attribute);
});
},
function(error){
console.log(error);
}
);
}