text: (function() {
      'use strict';
  
      angular
          .module('app.routes')
          .run(["$rootScope", "$location", function ($rootScope, $location) {
  
      $rootScope.$on("$routeChangeSuccess", function (userInfo) {
          console.log(userInfo);
      });
  
      $rootScope.$on("$routeChangeError", function (event, current, previous, eventObj) {
          if (eventObj.authenticated === false) {
              $location.path("/login");
          }
      });
    }]);
  })();
  