如何使用ng repeat收集数组中的数组?

时间:2019-08-13 12:00:18

标签: angular angular8

如何使用ng repeat显示数组内部的数组列表

我尝试使用ng repeat

<div ng-repeat="topology in topologies.topologies">
        <div ng-repeat="innerItem in topology.topologies">
</div>
              {{innerItem.id}}
        </div>
   </div>

我要迭代的对象

{
  "id": "Release1_1.0.0",
  "name": "Release1",
  "topologies": [
    {
      "id": 305,
      "name": "topology1",
      "hosts": [
        { "name": "host1"},
        { "name": "host2"}]
        },
    {
      "id": 315,
      "name": "topology1",
      "hosts": [
        { "name": "host1"},
        { "name": "host2"}]
        }]}

0 个答案:

没有答案