Angular UI Autocomplete Directive using Typeahead — NO JQUERY
It always bugs me that everyone resorts to using jQuery to write their angular autocomplete directives so I’ve toyed around with it until coming up with a pure angular solution. Enjoy this Plunker!
hi. am trying to get this to work. did you change the code or something? Your other type ahead plunk works but you didn’t expose the code so i can’t compare. With this example if you start typing in a country like Andorra, nothing happens (no dropdown with candidates) Can you advise what i could adjust to make it work? Thanks Steve C
Hi Steve, this example makes an api call to a countries service and is on a demo account so once it reaches the limit on api calls it stops retuning data to the angular code in my plunker. You can either make your own account on the service or use a different one. Sorry I’ve been meaning to change it but I haven’t had a chance yet.
jade, thanks so much for the quick response. i think it is something else. i made my own account and retried it. it’s more like the type-ahead functionality isn’t being called at all
It looks like they’ve changed the structure of the JSON that was being returned. I’ve updated the plunker, thanks for bringing it to my attention. http://plnkr.co/edit/wicjrz?p=preview
Doesn’t work
This has been having issues with the API response coming back — if there’s no API response then you’re right it doesn’t work.
Can you explain how this is supposed to work and what the format of the object is that is expected from the API response? If the API response object is documented then people can mock it up to try without needing to hit your api.geonames account.
How does prefetch work for example. People who are new will need that explained.