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

Q: Highlight parent by route name #2562

Closed
lamka02sk opened this Issue Dec 30, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@lamka02sk
Copy link

lamka02sk commented Dec 30, 2018

Hello, I am trying to automatically highlight parent menu item defined with route name.
My ability to explain problem verbally is bad, so I attach my code for better understanding.

My routes:

{
      path: '/parent',
      name: 'parent',
      component: Parent,
      children: [
        {
          path: '/child',
          name: 'parent.child',
          component: Child
        }
      ]
}

My router link in menu:

<router-link :to="{ name: 'parent' }">Parent</router-link>

Is it possible to highlight this menu item when the current route is parent.child? For example: <router-link :to="{ name: 'parent*' }">Parent</router-link> does not work and item will not be highlighted at all.

I would rather not write route paths because I will be adding localised routes later on and it will stop working for another languages. Thanks

@vue-bot

This comment has been minimized.

Copy link

vue-bot commented Dec 30, 2018

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!

@vue-bot vue-bot closed this Dec 30, 2018

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