angularjsdatatablesangular-datatables

Angular DataTable not populating DTInstance


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>

Solution

  • 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

    vm.dtInstance = {};
    

    It fixed when I changed it into vm.dtInstance = null; even vm.dtInstance = undefined wont work.