On next example I modified event, so instead on button click now call is on-change:
<input type="text" ng-model="keywords" ng-change="search()"/>
a-simple-search-with-angularjs-and-php
How to add delay/timeout so the script waits a second before making AJAX call? (i.e. to give the user time to finish typing before making call)