我正在开发一个加载微调器,当我在控制器中包含微调器时工作正常,我正在使用以下http://angularscript.com/demo/angularjs-based-loading-spinner-overlay/
这是我的控制器
angular.module('app').controller('EmployeeController', function ($scope, appService) {
var employeesList = appService.GetEmployess();
$scope.spinner = {
active: true
};
employeesList.then(function successCallback(response) {
console.log(response.data);
$scope.Employees = response.data;
$scope.spinner = {
active: false
};
}, function errorCallback(response) {
});
});
当我在成功回复中删除$scope.spinner
时,这就是它的加载方式
var employeesList = appService.GetEmployess();
$scope.spinner = {
active: true
};
employeesList.then(function successCallback(response) {
console.log(response.data);
$scope.Employees = response.data;
}, function errorCallback(response) {
});
});
我需要的是我想在中心屏幕上显示加载面板,我该如何实现,或者是否有任何其他加载面板。我的html如下
<body ng-controller="EmployeeController">
<treasure-overlay-spinner active='spinner.active'>
<table tr-ng-grid='' items='Employees' page-items="10"></table>
</treasure-overlay-spinner>
</body>