You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a really nice library, and being able to just pass in a URL is quick and easy. But for some searches it's really useful to use an angular service to wrap the API call.
For example, in my particular environment I know that it will improve perceived performance to cache the API results locally after the first 2-3 characters, then filter the results in the client.
I don't want to prescribe how to make this work, but conceptually I'd be passing in a "searchFunction" instead of "url." The searchFunction would be asynchronous and return a promise. In the above example, my options would look like { searchFunction: MyAngularService.mySearchFunction }
Is this making sense? Is it doable?
The text was updated successfully, but these errors were encountered:
I understood that you would add $watch on npInputModel where you will do the service logic which will resolve the promise passed to the searchFunction, if that's right then yes, it make sense, but I think instead of $watch we should add another option like onInputChange and give me sometime to add it or you are welcome to contribute.
This is a really nice library, and being able to just pass in a URL is quick and easy. But for some searches it's really useful to use an angular service to wrap the API call.
For example, in my particular environment I know that it will improve perceived performance to cache the API results locally after the first 2-3 characters, then filter the results in the client.
I don't want to prescribe how to make this work, but conceptually I'd be passing in a "searchFunction" instead of "url." The searchFunction would be asynchronous and return a promise. In the above example, my options would look like
{ searchFunction: MyAngularService.mySearchFunction }
Is this making sense? Is it doable?
The text was updated successfully, but these errors were encountered: