Parent template Accueil (which has no content) has two child templates section1 and section2. This is the code used for the routing :
$urlRouterProvider.otherwise('/accueil/section1');
$stateProvider
.state('accueil', {
url: '/accueil',
templateUrl: 'pages/accueil.html'
})
.state('accueil.section1', {
url: '/section1',
templateUrl: 'templates/section1.html'
});
.state('accueil.section2', {
url: '/section2',
templateUrl: 'templates/section2.html',
controller: 'sectionCtrl'
})
This works fine if I go to /accueil/secion1 or /accueil/section2. The problem is that when I go to /accueil (having no content) I don't know how to redirect it to the 1st child template. Any ideas ?