2017-02-13 143 views
0

纳克重复不工作的第三循环(第三级)纳克重复

<div ng-repeat="child in jdata.children"> 
     <div ng-repeat="childsub in child.children"> 
      <div ng-repeat="text in childsub.text"> 
       {{ text.value}} 
      </div> 
     </div> 
    </div> 

对第三循环不工作

JSON数据(plunker link)是如下

{ 
    "children": [ 
    { 
     "type": "layer", 
     "visible": true, 
     "opacity": 1, 
     "blendingMode": "normal", 
     "name": "border", 
     "left": 0, 
     "right": 320, 
     "top": 0, 
     "bottom": 50, 
     "height": 50, 
     "width": 320, 
     "mask": {}, 
     "image": {} 
    }, 
    { 
     "type": "group", 
     "visible": false, 
     "opacity": 1, 
     "blendingMode": "normal", 
     "name": "Frame 1", 
     "left": -26, 
     "right": 338, 
     "top": 0, 
     "bottom": 182, 
     "height": 182, 
     "width": 364, 
     "childrens": [ 
     { 
      "type": "layer", 
      "visible": true, 
      "opacity": 1, 
      "blendingMode": "normal", 
      "name": "Savings that will make you smile like Barney", 
      "left": 117, 
      "right": 290, 
      "top": 7, 
      "bottom": 44, 
      "height": 37, 
      "width": 173, 
      "mask": {}, 
      "text": { 
      "value": "Savings that will make\ryou smile like Barney", 
      "font": { 
       "name": "VAGRoundedStd-Bold", 
       "sizes": [ 
       13, 
       13, 
       13, 
       13, 
       13 
       ], 
       "colors": [ 
       [ 
        91, 
        64, 
        142, 
        255 
       ], 
       [ 
        91, 
        64, 
        142, 
        255 
       ], 
       [ 
        91, 
        64, 
        142, 
        255 
       ], 
       [ 
        236, 
        0, 
        140, 
        255 
       ], 
       [ 
        91, 
        64, 
        142, 
        255 
       ] 
       ], 
       "alignment": [ 
       "center", 
       "center" 
       ] 
      }, 
      "left": 0, 
      "top": 0, 
      "right": 0, 
      "bottom": 0, 
      "transform": { 
       "xx": 1.3601764888729304, 
       "xy": 0, 
       "yx": 0, 
       "yy": 1.3627518109295933, 
       "tx": 203.50000000000003, 
       "ty": 20.704124478480498 
      } 
      }, 
      "image": {} 
     } 
     ] 
    } 
    ], 
    "document": { 
    "width": 320, 
    "height": 50, 
    "resources": { 
     "layerComps": [], 
     "guides": [], 
     "slices": [] 
    } 
    } 
} 
+0

为什么不只是做一个ng选项? –

+0

你有一个'childrens'键 –

回答

7

您在第二级有错拼'儿童'。

<div ng-repeat="child in jdata.children"> 
     <div ng-repeat="childsub in child.childrens"> 
      <div ng-repeat="text in childsub.text"> 
       <span>{{text.name}}</span> 
      </div> 
     </div> 
    </div> 
0

在第二div孩子有没有名为 “孩子”属性。您有一个名为“儿童”的属性。只需使用儿童而不是儿童在第二个div它应该工作。