injectParams - option for injecting child route params in parent compnent
DerHerrGammler opened this issue · comments
Felix Herold commented
It would be great if there would be a simple injection method for getting all route params. So also the params from child routes.
As example I got the following routes:
/example/:id
and /example/:id/:otherParam
The second path is a child route of the first and I want to access the :otherParam
from the parent route. A option for that within the injectParams()
or a new injectChildParams()
would be great.
Bastien commented
I use this, but it may be improved: https://gist.github.com/bastienmoulia/f79ead995a27bd98b4cea1c8425e1112