我使用了https://github.com/McNull/angular-block-ui
中的blockUI PLUGIN我面临的问题是我想要加载gif以及Saving Synids ...消息。 那我怎么能这样做呢。
$scope.saveDefSynId = function(item, event) {
if($rootScope.savedSynids.length!==0){
**blockUI.start({message: 'Saving Synids...'});**
var toSaveSynid=[];
angular.forEach($rootScope.savedSynids, function(value){
if(value.isSaved=='Y'|| value.isUpdated=='Y'){
toSaveSynid.push(value);
}
});
var clientId=$scope.selClient;
var responsePromise = $http.post("defineSaveSynId/"+clientId,toSaveSynid);
responsePromise.success(function(data, status, headers, config) {
$rootScope.savedSynids=[];
$scope.eMsg="Synids Saved Successfully";
**blockUI.stop();**
});
responsePromise.error(function(data, status, headers, config) {
alert("AJAX failed!");
});
}
此插件没有对jsp进行任何更改。
答案 0 :(得分:0)
根据文档,您需要更改默认值。
// Change the default overlay message
blockUIConfig.message = 'Saving Synids...';
例如
angular.module('myApp').config(function(blockUIConfig) {
// Change the default overlay message
blockUIConfig.message = 'Saving Synids...';
// Change the default delay to 100ms before the blocking is visible
blockUIConfig.delay = 100;
});
来源:http://angular-block-ui.nullest.com/#!/examples/documentation