Skip to content

Instantly share code, notes, and snippets.

@davidpp
Created July 25, 2013 20:23
Show Gist options
  • Save davidpp/6083400 to your computer and use it in GitHub Desktop.
Save davidpp/6083400 to your computer and use it in GitHub Desktop.
Log to console each transition change (useful to intercept a state before it change)
angular.module('SkylineApp').run(function($rootScope) {
return $rootScope.$on("$stateChangeStart", function(evt, toState, toParams, fromState, fromParams) {
return console.log("Transitioning from: " + fromState.name + " to: " + toState.name);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment