Thank you for this solution! It is very neat and elegant. Has made my app a lot smoother.
I'm using Vue 3 along with router 4.0.0 for this and got it to work flawlessly when all the routes are in a single file but when I break the routes into separate files I am unable to get child routes to work with your layout method. Have you encountered this before?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yeah, in general, it is the same solution as the one I chose to go with.
I'm not sure if I like the empty path.
Also in our big app, we don't just have one router file.
We have a router file for each path.
For example
/someSite/
would have its own router file with the paths for it likesomeSite/
someSite/:id
someSite/new
etc.I would like to see the
create
output for your solution :)Thank you for this solution! It is very neat and elegant. Has made my app a lot smoother.
I'm using Vue 3 along with router 4.0.0 for this and got it to work flawlessly when all the routes are in a single file but when I break the routes into separate files I am unable to get child routes to work with your layout method. Have you encountered this before?