Angular DataTables を使用していくつかのテーブルを管理する際に問題があります。
ここに私のhtmlコードの断片があります:
<table datatable="ng" dt-options="dtOptions" dt-instance="dtInstance"
class="row-border hover table table-striped table-bordered">
<table datatable="ng" dt-options="dtOptions2" dt-instance="dtInstance2"
class="row-border hover table table-striped table-bordered">
それが私のコントローラーコードです:
$scope.dtInstance = {};
$scope.dtInstance2 = {};
$scope.dtOptions = DTOptionsBuilder
.newOptions()
.withTableToolsButtons([]);
$scope.dtOptions2 = DTOptionsBuilder
.newOptions()
.withTableToolsButtons([]);
table2 を更新したいのですが、dtInstance2 が空であるため実行できませんが、他のものはうまく機能します。すべてのデータが表示されます。
どうすれば修正して dtInstance2 を取得できますか?