【发布时间】:2013-09-08 00:15:52
【问题描述】:
我想要重新排列表格中的行的功能(使用拖放对行进行排序)。 而且模型中行排列的索引也应该发生变化。
我该如何做类似的事情:http://jsfiddle.net/tzYbU/1162/ 使用 Angular 指令?
我将表格生成为:
<table id="sort" class="table table-striped table-bordered">
<thead>
<tr>
<th class="header-color-green"></th>
<th ng-repeat="titles in Rules.Titles">{{titles.title}}</th>
</tr>
</thead>
<tbody ng-repeat="rule in Rules.data">
<tr>
<td class="center"><span>{{rule.ruleSeq}}</span></td>
<td ng-repeat="data in rule.ruleData">{{statusArr[data.value]}}</td>
</tr>
</tbody>
</table>
【问题讨论】:
标签: javascript angularjs angularjs-directive html-table