Replies: 5 comments
-
Prior art: Moria |
Beta Was this translation helpful? Give feedback.
-
@porsager If you added it to v2, you'd need to be careful to only consider properties starting with a
The first three are probably pretty obvious: the first two should be allowed, and
The first would lend itself well to dynamic async route loading, but could lead to counter-intuitive behavior. The second would lend itself well to static async route loading, but would be simpler and slightly more consistent. The last is probably the simplest to implement and the simplest to understand: |
Beta Was this translation helpful? Give feedback.
-
I think you're misunderstanding my proposal.. I don't want any nested logic. Could you try to look again? I simply want to be able to give an object that has objects as values for keys, and if those objects aren't components or route resolvers the keys in the route through the tree are simply concatenated into the final route to match. (check the output from |
Beta Was this translation helpful? Give feedback.
-
Okay, so that reads like option 3 to me, |
Beta Was this translation helpful? Give feedback.
-
Yeah, I'm not contemplating you should be able to mix paths with components or route resolvers. Merely a way to split out routes to allow structuring projects a little better. I don't even think it would be a breaking change. |
Beta Was this translation helpful? Give feedback.
-
Description
Allowing nested routes as object to allow splitting route subsections in different files etc.
Why
I copy the snippet below between all my projects using
m.route
, and I've seen a lot of other people ask for it. (eg. on gitter)Possible Implementation & Open Questions
Support supplying a nested routes object directly to
m.route()
.flems example
This is what I use, but using it / something like it to normalize routes in core should be fairly trivial..
Is this something you're interested in working on?
Yes
Beta Was this translation helpful? Give feedback.
All reactions