Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name parent routes #110

Open
jods4 opened this issue Nov 5, 2021 · 3 comments
Open

Name parent routes #110

jods4 opened this issue Nov 5, 2021 · 3 comments

Comments

@jods4
Copy link

jods4 commented Nov 5, 2021

Kind of related to #86, which said it's not possible to define a parent route name in <route> block.

Why is the name of parent routes removed? code here:

delete route.name

The router supports navigating to a parent route with no child match (at least we do it and it seems to work perfectly with no warning on console).
It'd be easier to navigate to such routes if the name was kept.

@hannoeru
Copy link
Owner

hannoeru commented Nov 6, 2021

If children route is index.vue it will use parent route's name as its name, so if we keep parent route's name it will become a conflict.

@jods4
Copy link
Author

jods4 commented Nov 6, 2021

Can we make an exception if there's an index child route?
It makes sense because when there's a / child, you can't navigate to the parent only anymore.

When there's no index child, you can navigate to the parent, so it's nice that it has a (default) name.

@MyZhouGit
Copy link

Hello,i want to know this issue when can be resolved.Because i have the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants