I am creating an angular application and for part of the application, I want to have a menu with dynamically populated options based on the available states. Here is the simplified part of my state configuration:
$stateProvider.state('root.type.list.controls', {
url: '/controls',
templateUrl: 'views/controls.html',
controller: 'ControlsCtrl',
data: {
title: 'Controls'
}
})
.state('root.type.list.items', {
url: '/items',
templateUrl: 'views/items.html',
controller: 'ItemsCtrl',
data: {
title: 'Items'
}
})
I would like to be able to populate the drop-down menu with headers from each immediate child 'root.type.list', depending on what is in the dataconfiguration section . Is there a way to get a list of all child states for a particular state?
source
share