angualr js busy when routing

Solutions on MaxInterview for angualr js busy when routing by the best coders in the world

showing results for - "angualr js busy when routing"
Antonia
28 Mar 2017
1 app.directive('showDuringResolve', function($rootScope) {
2
3      return {
4         link: function(scope, element) {
5
6              element.addClass('ng-hide');
7              $rootScope.statechange =  true;
8
9             var unregister = $rootScope.$on('$routeChangeStart', function() {
10                element.removeClass('ng-hide');
11                   $rootScope.statechange =  false;
12            });
13
14            scope.$on('$destroy', unregister);
15          }
16       };
17     });
18
Sarah
12 Feb 2016
1<div ng-view ng-show="statechange"></div>
2  <div ng-show="!statechange" show-during-resolve class="alert alert-info">
3      <strong>Loading.</strong>
4      Please hold.</div>
5