-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Labels
needs triageThis issue has not been looked intoThis issue has not been looked intotype: enhancement 🐺
Description
Is there an existing issue that is already proposing this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe it
RouterModule does not allow to define an array of paths. This prevents me to access the same nested routes by different prefixes.
Describe the solution you'd like
Controllers allow the definition of multiple basePaths like this:
@Controller(['equipment/:assetId', 'assets/:assetId'])
I want to bring the same functionality to the RouteModule such that we can nest controllers like this:
RouterModule.register([ { path: ['equipment/:assetId', 'assets/:assetId'], module: AssetModule, } ]),
Teachability, documentation, adoption, migration strategy
These docs can be updated after the change has been implemented
https://docs.nestjs.com/recipes/router-module
What is the motivation / use case for changing the behavior?
I want to be able to rename the prefix of nested controllers to better reflect the changed business logic, while still being backwards compatible.
Metadata
Metadata
Assignees
Labels
needs triageThis issue has not been looked intoThis issue has not been looked intotype: enhancement 🐺