I need to be able to pass this 2 routes in AngularJS :
.state('app.article', {
url: '/:catName/:articleName',
views: {
'menuContent': {
templateUrl: 'templates/article.html',
controller: 'ArticleCtrl'
}
}
})
.state('app.category', {
url: '/:catName/:subcatName',
views: {
'menuContent': {
templateUrl: 'templates/category.html',
controller: 'CategoryCtrl'
}
}
})
The problem is that they are both quite the same.
The only differance I do have is that an article name is ending with a -XXXXXX where XXXXXX is a number.
How can I do that?
thanks.