【发布时间】:2017-04-05 15:55:57
【问题描述】:
我正在使用角度数据表,我只有一列。
当我绑定它时,数据按升序排列,而我想按我收到的顺序显示它。
有人可以帮忙吗。
控制器:
var vm = this;
vm.dtOptions = DTOptionsBuilder.newOptions()
.withButtons([
'print',
'pdfHtml5',
]);
vm.dtColumnDefs = [
DTColumnDefBuilder.newColumnDef(0).notSortable()
];
HTML:
<div ng-controller="formViewController as frmView">
<table datatable="ng" dt-options="frmView.dtOptions" dt-column-defs="frmView.dtColumnDefs" class="row-border hover">
<thead>
<tr>
<td>
{{Title}}
</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="plugin in newArray track by $index">
<td>
//Content
</td>
</tr>
</tbody>
</table>
</div>
【问题讨论】:
-
我已经有了他们所说的,我想禁用排序,即升序-降序
标签: javascript angularjs datatables angular-datatables