Take a look at the example here: http://docs.angularjs.org/api/ng.filter:filter
You can search by any of the phone properties by using <input ng-model="search"> and you can search by just the name by using <input ng-model="search.name">, and the results are appropriately filtered by name (typing in a phone number does not return any results, as expected).
Let’s say I have a model with a “name” property, a “phone” property, and a “secret” property, how would I go about filtering by both the “name” and “phone” properties and not the “secret” property? So in essence, the user could type a name or phone number and the ng-repeat would filter correctly, but even if the user typed in a value that equaled part of a “secret” value, it wouldn’t return anything.
Thanks.
Here is the plunker
New plunker with cleaner code & where both the query and search list items are case insensitive
Main idea is create a filter function to achieve this purpose.
From official doc
Update
Some people might have a concern on performance in real world, which is correct.
In real world, we probably would do this kinda filter from controller.
Here is the detail post showing how to do it.
in short, we add
ng-changeto input for monitoring new search changeand then trigger filter function.