I have the following code:
<input type="text" ng-model="searchText">
<div ng-repeat="user in student.suggested_users | filter:searchText" ng-init="current_user = getUser(user)">{{current_user.name}}
</div>
This will help me in filtering objects from student.suggested_users array. But i want to filter on the name of the current_user object that is initialized for every user object.
Can anyone help me with this?
This is an example from my project: https://github.com/lucassus/mongo_browser/blob/master/app/assets/templates/databases.html and explanation how it works: http://jsfiddle.net/pkozlowski_opensource/JtAZM/1/
Basically instead ng-model="filterValue"
you should use ng-model="filterValue.{akey}"