acha-framework
Version:
is a modular framework on both client (angular.js) and server (node.js) side, it provides security, orm, ioc, obfuscation and ...
24 lines • 641 B
JavaScript
(function ($, angular, underscore, window, document, undefined) {
'use strict';
angular.module('frontend.services').run([
'$rootScope',
'appWaitingService',
function ($rootScope, appWaitingService) {
$rootScope.$on('$routeChangeStart', function () {
appWaitingService.start();
});
}
]).factory('appWaitingService', [
'$rootScope',
function ($rootScope) {
return {
stop: function () {
$rootScope.appWaiting = false;
},
start: function () {
$rootScope.appWaiting = true;
}
};
}
]);
}(jQuery, angular, _, window, document));