Using ui-router and setting the parent state url to / results in my url looking like localhost:8000/#//child when looking at a child page. I'd like just a single / between the hash and child.
I tried leaving the parent state url blank, but then ui-sref won't link back to the parent state when using an anchor link. Anybody got a solution for having a root level un-named parent url?
app.config
app.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/");
$stateProvider
.state("main", {
url: "/",
templateUrl: 'sites/main/main.html',
controller : 'MainController',
resolve: {
items: function(srvMenu) {
return srvMenu.getNav();
}
}
})
});
child.config
emergency.config(function($stateProvider) {
$stateProvider
.state("main.emergency", {
url: "/emergency",
templateUrl: 'sites/emergency/emergency_menu.html',
controller : 'EmenuController',
resolve: {
emenu: function(srvEmergency) {
return srvEmergency.getMenu();
}
}
})
.state("main.emergency.detail", {
url: "/detail",
templateUrl: 'sites/emergency/emergency_detail.html',
})
});