At the Javascript console, run showAllStates()
to see a JSON tree of the currently configured ui-router states as returned by $state.get()
.
Copy showStates code below into your Javascript console (tested with Chrome Devtools), and execute it to create the showStates function. Optionally, create similar functions in the console with the other scripts in this gist.
showAllStates = function () {
var $injector = angular.element('html').injector(),
$state = $injector.get('$state'),
states = $state.get(),
sObj = _(states).sortBy('name').reduce(reducer, {});
return JSON.stringify(sObj, null, 2);
function reducer(acc, val, key, col) {
return _.set(acc, val.name, val);
}
}
Assumes Angular and ui-router have already been bootstrapped. Assumes lodash is loaded.