I have two states like this:
$stateProvider.state('app', {
url: '/app',
template: '<app-index></app-index>',
data: {},
resolve: {}
});
$stateProvider.state('app.list', {
url: '/list/:type?',
template: '<app-list></app-list>',
data: {},
resolve: {}
})
it work fine but when I type url /app/list it redirect to home page, how can I make slash optional? I've tried to put this url '/list/?:type?' but that didn't work. Should I add redirect, if yes then how?