Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/403.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何进行双套角重复_Javascript_Json_Angularjs_Angularjs Ng Repeat - Fatal编程技术网

Javascript 如何进行双套角重复

Javascript 如何进行双套角重复,javascript,json,angularjs,angularjs-ng-repeat,Javascript,Json,Angularjs,Angularjs Ng Repeat,我有一个模板,它是按照以下方式构造的 <div ng-repeat="itemEntry in itemEntry"> <!-- content --> <section class="product-view-wrapper" ng-repeat="productView in itemEntry.Productview"> <div class="slide" ng-repeat="productImg in itemEnt

我有一个模板,它是按照以下方式构造的

<div ng-repeat="itemEntry in itemEntry">
   <!-- content -->
    <section class="product-view-wrapper" ng-repeat="productView in itemEntry.Productview">
      <div class="slide" ng-repeat="productImg in itemEntry.productImgs">
        <img ng-src="{{productImgs.img}}"/>
      </div>
     <!-- Content -->
 </section>
 </div>
但是,我注意到,当通过inspect元素查看时,
productImg
内容不会出现。再次说明,当对ng重复函数进行双重嵌套时,结构是否正确?如果可以这样做的话


您没有在嵌套重复中的正确数组上重复。我将您的演示缩小到与问题相关的html

<section class="product-view-wrapper" ng-repeat="productObject in itemEntry">
  <!-- each loop of the <section> will output from productObject contained in itemEntry array -->
  <h3>{{productObject.productDesc}}</h3>
  <img ng-src="{{productObject.image}}" height="120px">
  <h4>Repeating images</h4>
   <!-- want to loop over array contained in each productObject -->
  <div class="slide" ng-repeat="productImg in productObject.productImgs" style="float:left">
    <img ng-src="{{productImg.img}}" height="80px" />
  </div>
  <hr style="clear:both">

</section>

{{productObject.productDesc}
重复图像


这是可以做到的,看看关于这个问题的其他问题
<section class="product-view-wrapper" ng-repeat="productObject in itemEntry">
  <!-- each loop of the <section> will output from productObject contained in itemEntry array -->
  <h3>{{productObject.productDesc}}</h3>
  <img ng-src="{{productObject.image}}" height="120px">
  <h4>Repeating images</h4>
   <!-- want to loop over array contained in each productObject -->
  <div class="slide" ng-repeat="productImg in productObject.productImgs" style="float:left">
    <img ng-src="{{productImg.img}}" height="80px" />
  </div>
  <hr style="clear:both">

</section>