Angularjs 在角度数据表中显示加载消息

Angularjs 在角度数据表中显示加载消息,angularjs,datatables,angular-datatables,Angularjs,Datatables,Angular Datatables,控制器 app.controller('myController', ['$scope', 'dashboardService', 'DTOptionsBuilder', function ($scope, dashboardService, DTOptionsBuilder) { $scope.dtMasterOptions = DTOptionsBuilder.newOptions() .withDisplayLength(10) .with

控制器

  app.controller('myController', ['$scope', 'dashboardService', 'DTOptionsBuilder', function ($scope, dashboardService, DTOptionsBuilder) { 
   $scope.dtMasterOptions =
    DTOptionsBuilder.newOptions()       
    .withDisplayLength(10)
    .withOption('bLengthChange', true)
    .withPaginationType('full_numbers')
    .withBootstrap();       
   $scope.ViewData = function () {       
    var getData = dashboardService.getAllSubmitted();
    getData.then(function (job) {
        $scope.submitedjob = job.data;            
    },
    function (response) { document.write(response.status + "<br/>" + response.data); });
} 
 }]);
app.controller('myController',['$scope','dashboardService','DTOptionsBuilder',函数($scope,dashboardService,DTOptionsBuilder){
$scope.dtMasterOptions=
DTOptionsBuilder.newOptions()
.带显示长度(10)
.withOption('bLengthChange',true)
.withPaginationType('完整编号')
.withBootstrap();
$scope.ViewData=函数(){
var getData=dashboardService.getAllSubmitted();
getData.then(函数(作业){
$scope.submitedjob=job.data;
},
函数(response){document.write(response.status+“
”+response.data);}); } }]);
html代码

       <table style="width:100%;" ng-controller='myController'>
        <tr>
        <td align="center" style="padding:25px;" ng-init=" ViewData();">
            <table datatable="ng" dt-options="dtMasterOptions" class="table table-striped table-bordered" ng-cloak>
                <thead>
                    <tr>
                        <th class="text-danger" style="width:5%;">S. No.</th>
                        <th style="width:10%;">Applicant ID</th>
                        <th style="width:15%;">Email</th>
                        <th style="width:15%;">Full Name</th>
                        <th style="width:10%;">Contact No</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="x in submitedjob" ng-if="x.SubmittedStatus==='Submitted'">
                        <td>{{$index + 1}}</td>
                        <td>{{x.ApplicantID}}</td>
                        <td>{{x.Username}}</td>
                        <td>{{x.Salutation}} {{x.Firstname}} {{x.Middlename}} {{x.Lastname}}</td>
                        <td>{{x.Mobile}}</td>                            
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>
</table>

美国号。
申请人ID
电子邮件
全名
联系电话
{{$index+1}}
{x.applicationId}
{{x.Username}
{{x.saltation}{x.Firstname}{{x.Middlename}}{{x.Lastname}}
{{x.Mobile}}

在数据完全加载之前,此处显示消息“无数据表可用”
因此,我想在数据表中的数据完全加载之前显示加载消息,而不是“无数据可用”消息

withOption('processing',true)
添加到
DTOptionsBuilder.newOptions()
它应该显示加载消息。

请参阅并感谢回复@davidkonrad,我试过了,但没有work@Pravinhow你能解决这个问题吗。请帮助我解决我不使用的angularjs中的相同问题,fromSource函数请指导我这对我来说非常紧急感谢回复@Deendayal,但我已经尝试过它不起作用,这是一个有用的示例,但当我尝试像DTOptionBuilder.fromSource(job.data)一样传递时从正确的列名给出,但没有显示任何原因?您缺少
data1.json
文件。看看这个。否我想像DTOptionsBuilder一样传递。fromSource(dataPara)而不是文件名请签入我的dataPara变量,因为我的数据来自对象,所以我想传递“dataPara”而不是文件名