mardi 11 décembre 2018

API Call after user selection

Um Currently working on an old angular js application.

This has a series of checkboxes where the user can select an option/ several options. for every selection, it does a backend api call. but I want to avoid making a backend call for every selection but allow the user to do his selection for a couple of seconds and then do a backend call at once. I tried to achieve it via a $timeout function, even though it wait for a couple of seconds until the user does the selection, but it does call for the backend API for the number of time I select/deselect the options.

plunker : sample plunker

much appreciate if someone could suggest me a solution.

Thanks




Aucun commentaire:

Enregistrer un commentaire