答案 0 :(得分:0)
您可以使用ng-repeat创建包含单列的表。
<table ng-repeat="employee in employees track by $index"
ng-init="colIndex = $index">
<tr ng-repeat='info in employee track by $index'
ng-init="rowIndex = $index"
ng-click="rowIndex === 0 ? clicked(colIndex) : null" >
</tr>
</table>
要查看可折叠表格的演示,请访问:https://codepen.io/Midhun1993/pen/mRVGjq/