From 592cdb34a168eb20b508fbfefc78de7ea6e583bc Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Tue, 27 Oct 2015 13:32:20 +0100 Subject: [PATCH 1/2] fix (bower) rise angular version dependency Impossible to install ngHelperBusy with the last version of AngularJS 1.x --- bower.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 63189e4..c3d1219 100644 --- a/bower.json +++ b/bower.json @@ -1 +1,14 @@ -{"name":"ngHelperBusy","main":["ngHelperBusy.js","ngHelperBusy.css"],"version":"0.3.3","homepage":"https://github.com/ngHelper/ngHelperBusy","authors":["dei79 "],"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"}} \ No newline at end of file +{ + "name": "ngHelperBusy", + "main": ["ngHelperBusy.js", "ngHelperBusy.css"], + "version": "0.3.3", + "homepage": "https://github.com/ngHelper/ngHelperBusy", + "authors": ["dei79 "], + "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" + } +} From 9a8fc8a1bd4c46d003e22bc50e94b495ca73756e Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Wed, 28 Oct 2015 08:59:23 +0100 Subject: [PATCH 2/2] feat : be busy on loading --- ngHelperBusy.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ngHelperBusy.js b/ngHelperBusy.js index 88544f0..e9d6181 100644 --- a/ngHelperBusy.js +++ b/ngHelperBusy.js @@ -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(); + } }]); /** @@ -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; }; @@ -123,4 +130,4 @@ ngHelperBusy.service('$busy', [ '$q', '$rootScope', function($q, $rootScope) { // reset the message self.resetMessage(); } -}]); \ No newline at end of file +}]);