我已经从https://github.com/mcnull/angular-block-ui
使用了blockui插件我面临的问题是,我想将加载GIF加载以及保存SYNID ...消息。那我该怎么做。
$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没有进行更改。
根据文档,您需要更改默认值。
// 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