0

I want to implement predictive search using angular. Suppose, there are data of tens of thousands of employees then it's not feasible to preload all the data and use filter to on it.

How can I perform the same task? I want my search box dropdown <div> to show results just like its shown in Google Search.

Billal Begueradj
  • 20,717
  • 43
  • 112
  • 130
Nikhil
  • 665
  • 2
  • 11
  • 25

2 Answers2

0

If you don't want to preload that much data on the browser you will need to do it server side and provide an API that will accept search params, search the database, and return a list of matches. I suggest reading up on type-aheads.

Joshua J Wilborn
  • 526
  • 3
  • 13
0

I would use angular-ui-bootstrap typeahead directive: https://angular-ui.github.io/bootstrap/#!#typeahead.

See this post for making calls to a server : How to tie angular-ui's typeahead with a server via $http for server side optimization?

Community
  • 1
  • 1
kennypowers
  • 199
  • 1
  • 8