0
民间我使用简单的ng-repeat指令来显示表格中的数据。 但是,当指令呈现时,第一列将占用所有空间并对表格进行分解。ng-repeat表格显示不正确
看看这里的plnkr: http://plnkr.co/edit/Hahh4uyQ130zOS8noC3D
请关注上档的layout.html
<table>
<thead>
<tr ng-repeat="element in header" class="header-cells" style="width:{{element.width}}px">
<th drop-down-sort-menu>{{element.column}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="element in body">
<td ng-repeat="h in header" row="{{$parent.$index}}" col="{{$index}}" style="width:{{element.width}}px">{{element[h.column]}}
</td>
</tr>
</tbody>
</table>
我相信它的一些次要的。任何线索
你有几个问题。 http://plnkr.co/edit/coVXMyzSGKF0EdrkObsL?p=preview我无法发布答案,因为有人标记了你的帖子。 –
@詹姆斯,最好让你的问题更清楚些,以避免被标记出来。 –
克雷格..你的解决方案工作..感谢很多..我不能标记你的答案是正确的,不幸的是, – runtimeZero