Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.run(['$rootScope',function($rootScope){
- $rootScope.stateIsLoading = false;
- $rootScope.$on('$routeChangeStart', function() {
- $rootScope.stateIsLoading = true;
- });
- $rootScope.$on('$routeChangeSuccess', function() {
- $rootScope.stateIsLoading = false;
- });
- $rootScope.$on('$routeChangeError', function() {
- //catch error
- });
- }])
Add Comment
Please, Sign In to add comment