0
鍵我有這樣的:過濾NG重複與父NG-重複
<div class="row" ng-repeat="(key, value) in categories">
<h5>{{ value }}</h5>
<ul>
<li ng-repeat="post in $parent.posts | filter: key">{{ post.name }} -- {{ post.category }}</li>
</ul>
</div>
我想要的職位的嵌套ng-repeat
是由key
的類別進行篩選。
的想法是讓每個崗位顯示相關的帖子,其中{{ post.category }}
是相同{{ value }}
[在角度如何可以遍歷鍵,在值NG-重複](的可能的複製http://stackoverflow.com/questions/15127834/how-can-i -ite-over-the-keys-value-in-ng-repeat-in-angular) –
@DurgpalSingh不,不重複。我的問題是,如何使用第一個ng-repeat中的'key'作爲第二個ng-repeat的過濾器。你給的鏈接是如何在數據集中執行'(key,value)' – Rexford