Created
March 12, 2014 13:52
-
-
Save sebastibe/9507353 to your computer and use it in GitHub Desktop.
A snippet do debug angular ui-router
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rootScope.$on "$stateChangeStart", (event, toState, toParams, fromState, fromParams) -> | |
console.log "$stateChangeStart to " + toState.to + "- fired when the transition begins. toState,toParams : \n", toState, toParams | |
$rootScope.$on "$stateChangeError", (event, toState, toParams, fromState, fromParams) -> | |
console.log "$stateChangeError - fired when an error occurs during transition." | |
console.log arguments_ | |
$rootScope.$on "$stateChangeSuccess", (event, toState, toParams, fromState, fromParams) -> | |
console.log "$stateChangeSuccess to " + toState.name + "- fired once the state transition is complete." | |
$rootScope.$on "$viewContentLoaded", (event) -> | |
console.log "$viewContentLoaded - fired after dom rendered", event | |
$rootScope.$on "$stateNotFound", (event, unfoundState, fromState, fromParams) -> | |
console.log "$stateNotFound " + unfoundState.to + " - fired when a state cannot be found by its name." | |
console.log unfoundState, fromState, fromParams |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment