When attempting to filter an ng-repeat using two columns of the data, I encountered an issue.
Data
- name (string)
- address = [{city (string)}] (array)
HTML
<input type="text" class="search-query" ng-model="search.attributes.name" />
<select ui-select2 id="select2" data-placeholder="Type" ng-model="search.attributes.address.0.city" class="form-control">
<option value=""></option>
<option ng-repeat="type in types" value="{{type}}">{{type}}</option>
</select>
<tr ng-repeat="resource in resources | filter:search | limitTo: 10">
Strangely, none of the data appears when this setup is used. If I remove the select
box completely, all data is displayed. However, once I input something in the search box, it seems like the filter removes everything from view.