$rootScope.$on('$stateChangeError', function (event, toState, toParams, fromState, fromParams, error) {
      console.log("Routing Event", event.name);
      console.log("From State", fromState);
      console.log("To State", toState);
      console.log("Error", error);