vetekrans
vetekrans
NNuxt
Created by vetekrans on 5/15/2024 in #❓・help
"router-link-active" not added when on sub route
My pages structure looks like this: index.vue admin.vue (NuxtPage) admin - index.vue - posts.vue (NuxtPage) - posts - index.vue - categories.vue (NuxtPage) - categories - index.vue I have a list of links for the admin pages (when on admin), one of them leading to /admin/posts. When I'm on that route it sets router-link-activeand router-link-exact-activeproperly, but on /admin/posts/categories the link has neither. From what I understand the mostly "empty" vue files with <NuxtPage /> should do the trick but it doesn't seem to work or I'm missing something. I'm using @nuxtjs/i18n to localize paths if that could effect somehow, so it's the modified NuxtLinkLocale that's used. So /admin/posts/categories are, since it is in swedish, /admin/inlagg/kategorier.
4 replies