Question: Typeahead on callback
Im having a really hard time figuring out what is going wrong here... http://plnkr.co/edit/poEM9J?p=preview
What im trying to do is call the Yahoo Service, and when the callback comes, insert into the typeahead dropdown.
But it dosen't seems like it's happy with the delayed response, any ideas?
Try this: http://plnkr.co/edit/awR7gV?p=preview
Your sir are brilliant!
Guess i should go about $Q and $defer.. :)
@rgaskill Thnx for helping out on this one!
@Marcohj this was tricky as it looks like this Yahoo service is really picky about callback names. With another service, we could use standard JSONP request with AngularJS and the whole code becomes way simpler.
For example, here is the plunker showing autocomplete for all the cities in US: http://plnkr.co/edit/eGG9Kj?p=preview
@pkozlowski-opensource it seems that in your plunker typeahead cannot correctly load its template from $templateCache; is this a known issue?
@redaemn, sorry, I guss I've created 10 000 plunks and linked the wrong one :-) Check this: http://plnkr.co/edit/eGG9Kj?p=preview