I am trying to filter the data according to firstname
and title
properties but it's not filtering.
<label>by Name
<input type="text" ng-model="searchText.data.firstname"></label> |
<label>by Title
<select name="title">
<option value="">All</option>
<option value="">Zone Manager</option>
<option value="">Logistic agent</option>
</select></label>
<hr/>
<div ng-repeat="accDetails in acct_list | filter:searchText">
{{accDetails.data.firstname}} |
{{accDetails.data.lastname}} |
{{accDetails.title}}
</div>
The JSON data is:
$scope.acct_list = {
"0": {
"data": {
"firstname": "maeli",
"lastname": "mad",
//...
},
"title": "Shop"
},
"1": {
"data": {
//...
},
"title": "hotel"
}
}
Here is my plnkr