angularjs - See what states are configured in ui-router -


is there way see of states have been set on $stateprovider?

in case, state assignments distributed across many files. inspect built states on run or config in different file.

for example:

# component1.coffee angular.module('zoo').config ($stateprovider) ->   $stateprovider.state 'component1',     url: '/component1'     template: _template     controller: 'component1ctrl'  # component2.coffee angular.module('zoo').config ($stateprovider) ->   $stateprovider.state 'component2',     url: '/component2'     template: _template     controller: 'component2ctrl'  # componentnavigation.coffee angular.module('zoo').run ($state) ->   console.log 'all configured states:', $state.configuredstates # doesn't exist. 

is there list out 2 states, component1 , component2?

$state.get()

returns array of states. includes top-level abstract state, can filter out if want.

how enumerate registered states in ui-router?


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -