In my Angular app, I am using ng-keyup to search data from my backend. However, the issue is that it sends a request to the server with every key press. Is there a way to configure it to send a post request only after the user has paused or stopped typing? Or should I avoid using ng-keyup for this purpose?
Here is my HTML code:
<input ng-keyup="search(data)" ng-model="data" type="text"/>
This is the function in my controller:
$scope.search=function($scope, $http){
....insert HTTP post codes here...
}