N
Nuxt8mo ago
Jan

NuxtLink missing active class when sub-path is open.

Hey, I have a problem while using NuxtLink. I have a NuxtLink with the "to" property set to "/tickets". When i open the url to /tickets, the link gets the active-class. But when I open /tickets/ticket/567 the link does not get the active-class. The directory structure is as follows.
pages/
|__ tickets
|__ index.vue
|__ ticket
|__ [id].vue
pages/
|__ tickets
|__ index.vue
|__ ticket
|__ [id].vue
Anyone has an Idea on how to fix this?
3 Replies
Jan
JanOP8mo ago
nvm. Sometimes you just need to ask the question to find the solution yourself.
Del
Del5mo ago
How did you fix it?
Jan
JanOP5mo ago
It was just adding a ticket.vue file with <NuxtPage> into the tickets folder

Did you find this page helpful?