我正在重复一个包含键/值对的数据模型 . 假设有30行,其中5行包含键中的字符串'map' .
我想过滤显示,只显示那些包含字符串'map'的对象 . 我知道这是一个过滤器,但是,我对文档没有太多运气 - 它没有涉及键/值的ng-repeat .
有关如何实现这一点的任何想法?
<div class="row"
data-ng-repeat="(textKey, textValue) in publisher.update.file">
<div class="small-3 columns">
<label class="text-right inline"
for="file"
id="textKey">
{{ textKey }}
</label>
</div>
<div class="text-align-left small-9 columns">
<input name="textKey"
ng-model="publisher.update.lang[textKey]">
</div>
</div>
1 回答
我怀疑你能用 default filter做到这一点
doc说:
但是您可以创建自己的过滤器来实现此目的 . 这是一个例子