I'm using an angular directive (angucomplete-alt) to generate a list of suggestions as I type into ta field. I have an issue that if I make the request using $http like below the directive picks up the data and displays it.
return $http.get(
myurl,
{
params: {
code: strQuery.toUpperCase()
}
}
);
Alertnatively, if I return the data in a promise the directive just keep giving me an error. How can I get to this work properly as it seems like even though I'm calling the same endpoint I get way different responses
return service.mymethod(strQuery)
.then(function(data) {
console.log(data);
});
xx.data
wherexx
isundefined
. – Hacketo Dec 4 '15 at 14:14