I have a simple setup in my config()
$stateProvider
.state('app', {
'url': '/app',
'abstract': true,
'templateUrl': 'views/layout/index.html',
'controller': 'App'
})
.state('app.home', {
'url': '/home',
'views': {
'appContent': {
'templateUrl': 'views/home/index.html',
'controller': 'Home'
}
}
});
.state('app.asd', {
'url': '/asd/:idContact?',
'views': {
'appContent': {
'templateUrl': 'views/asd/index.html',
'controller': 'Asd'
}
}
});
$urlRouterProvider.otherwise('/app/home');
If i browse app/asd/7 everything works if i browse then app/asd it redirects me
I am wondering how can i make idContact param not required ? I used the classic $routeProvider sintax for it :(