答案 0 :(得分:0)
仅在过滤后有> 0匹配时才使用ng-show
来显示标题:
<div class="col-md-6" ng-repeat="round in displaymatch.allrounds>
<h3 ng-show="(round.matches | filter:namesearch).length > 0">Round: {{round.name}}</h3>
<div ng-repeat="teamname in round.matches | filter:namesearch">
<b>Match Date:</b> {{teamname.date}}
<a ng-href="#!/15/{{teamname.date}}/{{teamname.team1.code}}/{{teamname.team2.code}}">{{teamname.team1.name}} <strong>V/S</strong>
{{teamname.team2.name}}</a>
</div>
与this回答相似。