Angular DataTable不填写DTIsstance [英] Angular DataTable not populating DTInstance

查看:325
本文介绍了Angular DataTable不填写DTIsstance的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在渲染后我没有收到我的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>


推荐答案

我能够修复这个 https://github.com/l-lin/angular-datatables/issues/365

问题是由于我初始化了这样的dataHolder

The problem was due to I initialized the dataHolder like this

vm.dtInstance = {};

当我将其更改为 vm.dtInstance = null;
甚至 vm.dtInstance = undefined wont work。

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

这篇关于Angular DataTable不填写DTIsstance的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆