You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use case is that I have the root app and child apps for view rendering, because I am able to limit the views available to the app, which makes code a bit shorter and cleaner and also project structure is nicer. However I don't have the access to the path parameters in this case.
constroot=express()constapp=express()app.set('views','path1')app.get('/',(req)=>console.log(req.params))// prints '{}'root.use('/path/:someParam',app)
I can submit a PR as it is only one line of code if I didn't overlook something.
The text was updated successfully, but these errors were encountered:
Hello, thank you for your issue. You are right, there is no option for mergeParams for an app, only routers. I don't see any reason off-hand that an app cannot also enable that setting. If you would like to make a PR, you're welcome to do so, just remember to add all the necessary tests around the feature, not just one line to the one file :) . If you're not comfortable doing that, we can still add it for you, just let us know.
Hi,
is there way to make app merge params from the parent app right now? As far as I can tell only the strict and caseSensitive settings are configurable:
express/lib/application.js
Lines 144 to 149 in 33e8dc3
express/lib/application.js
Lines 64 to 75 in 318fd4b
My use case is that I have the root app and child apps for view rendering, because I am able to limit the views available to the app, which makes code a bit shorter and cleaner and also project structure is nicer. However I don't have the access to the path parameters in this case.
I can submit a PR as it is only one line of code if I didn't overlook something.
The text was updated successfully, but these errors were encountered: