我正在使用AngularJS與Angular-datatables(http://l-lin.github.io/angular-datatables/),我正在使用數據表ColVis插件。表呈現細但排序列標題或使用ColVis顯示/隱藏欄刪除所有數據:角度數據表與ColVis,排序或隱藏列刪除所有數據
我有一個角控制器
<div ng-controller="withColVisCtrl">
<table datatable dt-options="dtOptions">
<thead>
<tr>
<th>Col 1</th>
<th>Col 2</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="value in value_list">
<td>col 1 data</td>
<td> col 2 data</td>
</tr>
</tbody>
</table>
withColVisCtrl內的表使用,所述控制器:
angular.module('myApp').controller('withColVisCtrl', function ($scope, DTOptionsBuilder) {
$scope.dtOptions = DTOptionsBuilder.newOptions()
.withBootstrap()
.withColVis()
.withDOM('C<"clear">lfrtip')
.withColVisOption('aiExclude', [1]);
});
當我點擊列標題或使用ColVis顯示/隱藏時,表似乎重繪但沒有數據。我的數據通過API傳遞,因此它與Angular-Datatables ColVis示例(http://l-lin.github.io/angular-datatables/#/withColVis)不同。
我在這裏錯過了什麼?