0
我可以使用過濾器filterexpression沒有angularjs NG-重複。 篩選記錄與filterexpression angularjs不NG-重複
<li><input ng-model="query" placeholder="search on players" /> <input ng-model="q" placeholder="search on teams" /></li>
<li ng-repeat="(nomeTeam, squadre) in listaSquadre" >
<div ng-init="sq = squadre|filter:{nome:query,team:q}|orderBy:['pos','nome']" class="1c">
<pre>{{sq}}</pre>
<strong ng-show="sq.length > 0">{{nomeTeam}}</strong>
<ul>
<li ng-repeat="giocatore in sq" >{{giocatore.nome}} - {{giocatore.Role}} -
<span ng-switch="{{giocatore.pos}}">
<span ng-switch-when="1">PF</span>
<span ng-switch-when="2">PA</span>
</span>
</li>
</ul>
</div>
</li>
</ul>
上述代碼沒有過濾數據。我想打印的隊名,這是外部的NG-復讀,search.If檢索算法返回數據,我想打印的隊名,否則no.How我我能實現這一目標與angularjs。