I feel a bit silly for asking this, I've looked and searched for this for quite a few hours and know the two main methods for setting up default child states is to:
url: '',
or
$urlRouterProvider.when('/route', '/newroute');
I'm trying to use the empty url config as the reroute option causes unwanted issues when the parent state is set to abstract: true. All templates contain a ui-view element(s). My code looks similar to this at the moment:
.state('data', {
url: "/data",
templateUrl: "views/data.php",
})
.state('data.overview', {
url: "",
templateUrl: "views/subviews/data.overview.php",
})
.state('data.overview.view', {
url: "",
templateUrl: "views/subviews/subviews/data.overview.view.php"
})
.state('data.overview.view.msgfav', {
url: "",
views: {
msg: {
templateUrl: "views/subviews/subviews/data.overview.view.msg.php"
},
fav: {
templateUrl: "views/subviews/subviews/data.overview.view.fav.php"
}
}
})
As well as some more child states (which didn't seem relevant to include since not meant to be default). I've tried with the parent state as abstract: true and without setting it, with url empty and no url setting at all, with only the closest child state and not all nested. Sticking an ng-include in there can work as default state, but it feels unclean.Targeting each child directly works fine. I'm really not sure what I'm missing here, but I'm sure it's some small detail that will make me look silly.