Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 如何使用DTOptions更改datatable默认空表消息?_Angularjs_Datatable - Fatal编程技术网

Angularjs 如何使用DTOptions更改datatable默认空表消息?

Angularjs 如何使用DTOptions更改datatable默认空表消息?,angularjs,datatable,Angularjs,Datatable,我看到很多这样的问题 , 但是所有的解决方案都使用jquery,而我正试图弄清楚使用DTOptions的可能性 此时,我的代码如下所示: $scope.dtOptions = DTOptionsBuilder.newOptions() .withDisplayLength(10) .withOption('bFilter', false) .withOption('bProcessing', false)

我看到很多这样的问题

,

但是所有的解决方案都使用jquery,而我正试图弄清楚使用DTOptions的可能性

此时,我的代码如下所示:

$scope.dtOptions = DTOptionsBuilder.newOptions()
            .withDisplayLength(10)
            .withOption('bFilter', false)
            .withOption('bProcessing', false)
            .withOption('sScrollY', "300px")
            .withOption('sScrollX', false)
            .withOption('bPaginate', false);
和我的html:

<table id="newFornitures" class="table" datatable="ng" dt-options="dtOptions">

我正在搜索在
$scope.dtOptions
上添加选项的方法,该选项覆盖dataTable的默认消息

编辑: 正如我所说,我对jquery解决方案不感兴趣

试试下面的代码

$scope.dtOptions = DTOptionsBuilder.newOptions()
            .withDisplayLength(10)
            .withOption('bFilter', false)
            .withOption('bProcessing', false)
            .withOption('sScrollY', "300px")
            .withOption('sScrollX', false)
            .withOption('bPaginate', false)
            .withLanguage({"sEmptyTable":"Empty"})

你有任何代码要显示吗?可能是@Rahul的重复,我添加了一些代码。withLanguage({“sEmptyTable”:“Empty”})`