【发布时间】:2015-11-20 16:37:25
【问题描述】:
我在 ng-repeat 上有一组复杂的过滤器。我正在尝试获取通过每个选择列表过滤的数据集的计数。
这是我的 ng 重复:
<div class="trials-item {{class}}" ng-repeat="data in dataObject | byCountry : selectRegion | byRegion : selectState | byCity : selectCity | filterBy:['Phase']: selectPhase | filterBy:['Compound']: selectCompound | filterBy:['TherapeuticArea', 'TherapeuticArea_2',]: selectTherapy : 'strict' | unique: 'Id' | orderBy:'Phase' : reverse track by $index " ng-class="{'open':$index == selectedRow}" id="anchor-{{$index}}" >
尝试使用 {{ data.length }} 不起作用。我尝试使用这篇文章中详述的一些解决方案:How to display length of filtered ng-repeat data,但它们都处理一组更简单的过滤器,如果它们可以与我上面设置的过滤器一起使用,我一定不会得到语法/顺序正确。
【问题讨论】:
标签: angularjs ng-repeat angularjs-filter