表格行的Angular JS ng-repeat

时间:2015-05-06 09:56:21

标签: javascript angularjs twitter-bootstrap angularjs-ng-repeat

我正在使用以下引导程序表:

<table class="table table-striped">
   <thead>
      <tr>
         <th>Episode Date</th>
         <th>Day</th>
         <th>Projected Cost</th>
         <th>Comments</th>
      </tr>
   </thead>
   <tbody>
      <tr ng-repeat="epi in episodes">
         <td>
            <input type="hidden" ng-model="epi.COST_PRG_EPS_TXN_ID" />
            <label>{{epi.PRG_EPISODE_DATE_DIS | date:'dd-MMM-yyyy'}} </label>
         </td>
         <td>{{ epi.PRG_EPISODE_DAY }}</td>
         <td>
            <input type="text" ng-model="epi.COST_PROJECTED" onkeypress="return OnlyNumeric(event);" />
         </td>
         <td>
            <input type="text" ng-model="epi.COMMENTS" />
         </td>
      </tr>
   </tbody>
</table>

我收到错误:

  

TypeError:无法读取属性&#39; insertBefore&#39;为null

当我将ng-repeat用于表格行(tr)时。

但是,当我将ng-repeat剪切并粘贴到tbody时,它可以正常运行。

要求是在表格中重复tr而不是tbody。我该怎么办?

http://i.imgur.com/D52R9lq.png

0 个答案:

没有答案