我想在表上关联一个过滤器,但我认为该过滤器仅适用于数组对象,但是我有一个映射键值。所以我有输入过滤器:
<input type="text" class="form-control" placeholder="search items..." ng-model="filterQuery">
和我的桌子:
...<tbody ng-repeat="(key, value) in listReverseProxy | groupBy: 'id' | filter:filterQuery">
<tr class="bg-color-grayLight txt-color-white" ng-click="toggle()">
<td>{{ key }}</td>
<td></td>
<td ng-repeat="config in value">
<strong>
<i class="fa fa-check font-md" ng-class="config.enabled=='yes' ? 'txt-color-green' : 'txt-color-red'" title="deployed"></i>
</strong>
<strong>
<i class="fa fa-power-off font-md" ng-class="config.started=='yes' ? 'txt-color-green' : 'txt-color-red'" title="started"></i>
</strong>
<strong ng-if="config.restart=='yes'">
<i class="fa fa-retweet font-md txt-color-red" title="has restart pending"></i>
</strong>
</td>
<td ng-repeat="n in [] | range:(appliances.length - value.length)">-</td>
<td>
<i class="fa fa-sitemap font-md cursor-hand" title="Compare config on all environments" ng-click="compareConfigs(rp.instance_name)"></i>
<i class="fa fa-file-text-o font-md cursor-hand" title="View configs" ng-click="viewConfigs(rp.instance_name)"></i>
</td>
</tr>...
不适用于“ ng-repeat ='(key,value)'”。我有一个错误“错误:[filter:notarray] http://errors.angularjs.org/1.4.2/filter/notarray?”
解决方案?