The index route stay active (and keep the class _nuxt-link-active_) even when another route is active.
Hi @gary149
This is an intended behaviour of vue-router
. To fix this, add the exact
attribute:
<nuxt-link to="/" exact">Home</nuxt-link>
You can learn more of the attributes you can use for <nuxt-link>
here: https://router.vuejs.org/en/api/router-link.html
Thanks!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi @gary149
This is an intended behaviour of
vue-router
. To fix this, add theexact
attribute:You can learn more of the attributes you can use for
<nuxt-link>
here: https://router.vuejs.org/en/api/router-link.html