javascript - Autocomplete on demand in angularJS -


i trying implement search function in angularjs pretty similar facebook way of searching. found out many tutorials, autocomplete directive works on data loaded , filtering that.
if data count huge calling service on page load takes in data make website slow. there possibility of making autocomplete loads data on demand? i.e onkeyup function if type "dru", every key event service called , fetch data on demand. thanks

yes can calling api on every key stroke change.

<input type="text" ng-model="search" ng-change="fetchsearchresults(search)"> 

the fetchsearchresults method make api call server, fetching results given characters input.

hope made sense.


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -