text: (function() {
    'use strict';
  
    angular.module('BlurAdmin.pages.config')
      .run(stateChangeStart);
  
    /** @ngInject */
    function stateChangeStart($rootScope, $state, localStorage) {
      $rootScope.$on("$stateChangeStart", function(event, toState, toParams, fromState, fromParams) {
        var userinfo = localStorage.getObject('userinfo');
        console.log("userinfo",userinfo );
        if (toState.authenticate && _.isEmpty(userinfo)) {
          // User isn’t authenticated
          $state.transitionTo("authSignIn");
          event.preventDefault();
        }
      });
    }
  
  })();