Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.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
Ember.js emberjs-嵌套表信息_Ember.js_Handlebars.js - Fatal编程技术网

Ember.js emberjs-嵌套表信息

Ember.js emberjs-嵌套表信息,ember.js,handlebars.js,Ember.js,Handlebars.js,我想嵌套一个不规则的表结构(使用实际表或使用div表)。我有一个“父”类的列表,每个类都有许多“子”实例,我想用一组头在同一个表中显示它们。我希望输出像这样(简化-我有更多的列要显示) 起源 孩子 除去 家长 孩子一 孩子二 但我不知道如何在车把上实现这一点,因为除了第一个孩子,我需要在每个孩子周围都有一个新的元素。这在代码中很容易理解,但我看不出如何在车把中干净利落地做到这一点。我是否可以或应该编写一个自定义视图?我所知道的简化ember中表格使用的唯一资源是ember table。请看一

我想嵌套一个不规则的表结构(使用实际表或使用div表)。我有一个“父”类的列表,每个类都有许多“子”实例,我想用一组头在同一个表中显示它们。我希望输出像这样(简化-我有更多的列要显示)


起源
孩子
除去
家长
孩子一
孩子二

但我不知道如何在车把上实现这一点,因为除了第一个孩子,我需要在每个孩子周围都有一个新的
元素。这在代码中很容易理解,但我看不出如何在车把中干净利落地做到这一点。我是否可以或应该编写一个自定义视图?

我所知道的简化ember中表格使用的唯一资源是ember table。请看一看,也许能帮上忙。
<table>
  <tr>
    <th>Parent</th>
    <th>Child</th>
    <th>Remove</th>
  </tr>
  <tr>
    <td colspan="2">parent one</td>
    <td>child one</td>
  </tr>
  <tr>
    <td>child two</td>
  </tr>
</table>