首页 > 解决方案 > AngularJs 中的 ng-repeat-start 和 ng-repeat-end 仅在 chrome 中不适用于特定用户

问题描述

我有一个表格,其中列出了具有阶段的项目,如下例所示。问题是该阶段中每个项目的标题都重复了。此问题仅针对特定用户发生,该用户使用与其他用户相同的 chrome 版本,并且在其系统的其他浏览器中运行良好。

column1 column2 column3
phase1
item1.1.1 item1.1.2 item1.1.3 
item1.2 item1.2.1 item1.2.3
...
phase2
item2.1.1 item2.1.2 item2.1.3
item2.2.1 item2.2.2 item2.2.3

我正在使用 angularjs,在我使用这样的表中来呈现上述场景

<table>
  <thead>
    <tr ng-repeat="heading in headings">
     {{heading}}
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat-start="phase in phases">
      <td>{{phase.heading}}</td>
    </tr>
    <tr ng-repeat-end>
      <td>phase.item(column1)</td>
      <td>phase.item(column2)</td> and so on
    </tr>
  </tbody>
</table>

问题是,阶段标题对其阶段中的每个项目都重复。例如:

column1 column2 column3
phase1
item1.1.1 item1.1.2 item1.1.3 
phase1
item1.2 item1.2.1 item1.2.3
...
phase2
item2.1.1 item2.1.2 item2.1.3
phase2
item2.2.1 item2.2.2 item2.2.3

标签: javascriptangularjsangularjs-ng-repeat

解决方案


推荐阅读