This question has been partly addressed here: Angular.js ng-repeat across multiple tr's

However that is just a work-around really, it doesn't actually address the core issue, which is: how can one use ng-repeat across multiple elements without a wrapper?

例如,jquery.手风琴需要你重复h3和div元素,你怎么能用ng重复呢?

推荐答案

We now have a proper support for this, please see:

AngularJs Commmit

with this change you can now do:

<table>
  <tr ng-repeat-start="item in list">
      <td>I get repeated</td>
  </tr>
  <tr ng-repeat-end>
      <td>I also get repeated</td>
  </tr>
</table>

Jquery相关问答推荐

从 React 到 Node 服务器的 ajax 调用中的数据未定义

jQuery:获取数据属性

jQuery函数从数组中获取所有唯一元素?

提醒未保存的表单更改

如何使用 AJAX 和 jQuery 发布 django 表单

如何使用 jQuery 重置 Select 元素

为什么要两次声明 jQuery?

jQuery UI 滑块(以编程方式设置)

jQuery getJSON 将结果保存到变量中

Codemirror 编辑器在单击之前不会加载内容

Bootstrap 3.0 弹出框和工具提示

jQuery - 多个 :not Select 器

如何清除/重置 jQuery UI Datepicker 日历上的选定日期?

如何在 JavaScript 中的对象数组中查找值?

如何使用 JQuery 获取 GET 和 POST 变量?

在 jQuery 中 Select 后代元素的最快方法是什么?

如何使用 javascript 展开和折叠

单击时平滑滚动到特定的 div

由于滚动,响应表内的 bootstrap 按钮下拉菜单不可见

用于发布和获取的 Ajax 教程