In my code, I have a sentence that looks like this:
.state('category', {
url: '/categories/:parameter',
templateUrl: 'templates/common/categories.html',
controller: 'categoriesCtrl',
resolve : {
categoryList: ['Products', function (Products) {
return Products.listByCategories($stateParams.parameter);
}]
}
})
It's for a simple web shop where products are listed based on categories. The issue is that the number of categories needs to be dynamic. For example, I might request:
/categories/shoes
/categories/shoes/man/
/categories/shoes/man/running
/categories/shoes/man/running/nike
The parameter must adjust dynamically, but I'm not sure how to achieve this. Can someone provide some guidance? Thank you!