【发布时间】:2016-04-24 05:51:36
【问题描述】:
我想在不使用面板的情况下以可折叠格式显示父子相关数据。
代码:
<div ng-app="app" ng-controller="customersCtrl">
<table st-table="rowCollection" class="table table-striped">
<tbody>
<tr ng-repeat="x in names">
<th > {{x.Country }}</th>
<td >{{ x.Name }}</td>
</tr>
</tbody>
</table>
</div>
首选:
我想在国家/地区下获得名称列表,扩展后我应该能够看到该国家/地区的名称列表。
【问题讨论】:
-
Accordion 来自 bootstrap,它是为响应而设计的。因此,它不依赖于表格 HTML 对象。另一种实现方式是使用 ng-if/ng-show 指令和 $animate 进行转换。但是,这不适用于表格。为什么不从引导程序向手风琴添加一些类并覆盖面板中您不想要的 CSS 定义?
标签: angularjs angularjs-ng-repeat angular-ui-bootstrap ngtable