Here is an example using mongolab: http://jsfiddle.net/CLVpf/2/
You can simply $watch request a variable to build the request URL, and call query() on the ngResource instance.
$scope.$watch('search', function (key) { var q = null; if (key) { q = { q: '{name:{$regex:"' + key + '"}}' }; } $scope.projects = Project.query(q); });
Here, Project is an instance of ngResource.
source share