I am not getting my DtInstance populated after rendering. Anyone faced this issue.
<div ng-controller="InventoryTableController as vm">
<table datatable="" dt-options="vm.dtOptions" dt-columns="vm.dtColumns"
dt-instance="vm.dtInstance"
class="display table table-bordered table-striped table-hover"></table>
</div>
I am using
and I was having the same issue, but it was resolved with the following code:
Controller
HTML
For me even vm.dtInstance = null; did not work. I ended up going throught the source of the directive and found that dt-instance can also be a setter function. That solved the problem for me.
Just adding my 2 cents here.
For me the problem was solved by @rosshays solution in the thread: https://github.com/l-lin/angular-datatables/issues/345
Update Dec. 4 2017: As per @trainoasis suggestion, i am copying the solution to here.
I was able to fix it by this https://github.com/l-lin/angular-datatables/issues/365
The problem was due to I initialized the dataHolder like this
It fixed when I changed it into
vm.dtInstance = null;
evenvm.dtInstance = undefined
wont work.