如何获取嵌套的 ng-repeat 项的数量
How to get the count of nested ng-repeat items
如果嵌套的 ng-repeat 块return过滤后没有值,我该如何隐藏它们? “[如果过滤集中没有项目隐藏]”
<div ng-repeat="thisCategory in Categories">
<div class="panel panel-default" ng-hide="filterResult[$index].length == 0">
<div class="panel-body" [if no items in filtered set hide]>
<div>
</h1>{{thisCategory.Title}}</h1>
</div>
<table class="table table-condensed table-hover">
<tr ng-repeat="app in (filterResult = (apps | filter:search ))">
<td>
{{app.Title}}
</td>
</tr>
</table>
</div>
</div>
</div>
有点像;
<table class="table table-condensed table-hover"
ng-show="(filterResult[$index] = (apps | filter:search )).length">
<tr ng-repeat="app in (filterResult[$index] = (apps | filter:search ))">
<td>
{{app.Title}}
</td>
</tr>
</table>
如果嵌套的 ng-repeat 块return过滤后没有值,我该如何隐藏它们? “[如果过滤集中没有项目隐藏]”
<div ng-repeat="thisCategory in Categories">
<div class="panel panel-default" ng-hide="filterResult[$index].length == 0">
<div class="panel-body" [if no items in filtered set hide]>
<div>
</h1>{{thisCategory.Title}}</h1>
</div>
<table class="table table-condensed table-hover">
<tr ng-repeat="app in (filterResult = (apps | filter:search ))">
<td>
{{app.Title}}
</td>
</tr>
</table>
</div>
</div>
</div>
有点像;
<table class="table table-condensed table-hover"
ng-show="(filterResult[$index] = (apps | filter:search )).length">
<tr ng-repeat="app in (filterResult[$index] = (apps | filter:search ))">
<td>
{{app.Title}}
</td>
</tr>
</table>