【发布时间】:2018-09-10 11:50:43
【问题描述】:
在我的数组中有多个具有相同名称的键值。我想在我的视图中列出它们,我该如何实现?
我在声明 [ngRepeat:dupes] Duplicates in a repeater are not allowed 时遇到错误。
这是我的 JSON 数组 :-
["text-align", "space-before", "space-before.conditionality", "font-size", "font-weight", "line-height", "font-size", "font-weight", "line-height", "space-before", "font-size", "font-weight", "line-height", "position", "top", "bottom", "right", "left", "text-align", "force-page-count", "break-before", "font-size"]
我们可以看到很少有键在重复。我需要列出所有重复的值,而不会在我的视图中丢失任何值
【问题讨论】:
标签: arrays json angular angularjs-ng-repeat