我正在使用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)不同。
我在这里错过了什么?