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