Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
{"name":"ngHelperBusy","main":["ngHelperBusy.js","ngHelperBusy.css"],"version":"0.3.3","homepage":"https://github.com/ngHelper/ngHelperBusy","authors":["dei79 <dirk.eisenberg@gmail.com>"],"description":"A full screen busy indicator which is controlled by the $busy service and supports","keywords":["angular","angularjs","busy","service","directive"],"license":"MIT","ignore":["**/.*","node_modules","bower_components","test","tests"],"dependencies":{"angular":"~1.2"}}
{
"name": "ngHelperBusy",
"main": ["ngHelperBusy.js", "ngHelperBusy.css"],
"version": "0.3.3",
"homepage": "https://github.com/ngHelper/ngHelperBusy",
"authors": ["dei79 <dirk.eisenberg@gmail.com>"],
"description": "A full screen busy indicator which is controlled by the $busy service and supports",
"keywords": ["angular", "angularjs", "busy", "service", "directive"],
"license": "MIT",
"ignore": ["**/.*", "node_modules", "bower_components", "test", "tests"],
"dependencies": {
"angular": "^1.2"
}
}
9 changes: 8 additions & 1 deletion ngHelperBusy.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ ngHelperBusy.controller('NgHelperBusyCtrl', ['$scope', '$rootScope', '$busy', fu
$rootScope.$on('$busy.resetMessage', function() {
$scope.busyMessage = defaultMessage;
})

if( $busy.busyOnLoading ){
$scope.busyMessage = $busy.getBusyMessage();
$busy.beBusy();
}
}]);

/**
Expand All @@ -50,6 +55,8 @@ ngHelperBusy.service('$busy', [ '$q', '$rootScope', function($q, $rootScope) {
var self = this;
var currentMessage = null;

self.busyOnLoading = false;

self.getBusyMessage = function() {
return currentMessage;
};
Expand Down Expand Up @@ -123,4 +130,4 @@ ngHelperBusy.service('$busy', [ '$q', '$rootScope', function($q, $rootScope) {
// reset the message
self.resetMessage();
}
}]);
}]);