Please refer to this Plunk: http://plnkr.co/edit/5YCCdDSnpHKRU51R9vCL?p=preview
How do I filter based on the field that is displayed? Currently, the filtering is done on the complete user object.
For eg:
$scope.users1 = [
{name: 'Dave', id: 24},
{name: 'Tim', id: 22},
{name: 'Laura', id: 20}
];
<user-info-card users="users" label="name">
</user-info-card>
If I display only the id, the filter works even if I type "Dave". I want it to work only on the fields displayed. Also want it to be generic. It could be a different object but the search term should look at the label field and filter accordingly