Skip to content Skip to sidebar Skip to footer

Angular Typeahead : Watch For Dataset Change

I am using Siyfion's typeahead directive in my project. What I do in my controller is something like this : $http({method: 'GET', 'url': CONFIG.SOMEURL})

Solution 1:

Full disclosure: I'm the author of the aforementioned directive.

Essentially, you are trying to do all the prefetching in Angular itself, when Typeahead.js & Bloodhound are designed specifically to do this for you. Take a good look at https://twitter.github.io/typeahead.js/examples/ and pay particular attention to the Bloodhound suggestion engine.

Perhaps of some use:

NOTE: The version of the directive you were using (9 months ago) didn't support updating the dataset local variable, but it now does, so you could do it that way, if you liked.


Post a Comment for "Angular Typeahead : Watch For Dataset Change"