Как посмотреть, какие состояния настроены в AngularJS / UI-Router?

Есть ли способ увидеть все состояния, которые были установлены на$stateProvider?

В этом случае я хотел бы, чтобы мои назначения состояний были распределены по многим файлам. Я хотел бы проверить построенные государства наrun или жеconfig в другом файле.

Например:

# 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.

Есть ли что-то, что перечислит два состояния,component1 а такжеcomponent2?

Ответы на вопрос(2)

Ваш ответ на вопрос