Nuxt.js: nuxt-link-active stays active

Created on 12 Jan 2017  路  3Comments  路  Source: nuxt/nuxt.js

The index route stay active (and keep the class _nuxt-link-active_) even when another route is active.

image

question

Most helpful comment

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

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VincentLoy picture VincentLoy  路  3Comments

danieloprado picture danieloprado  路  3Comments

mattdharmon picture mattdharmon  路  3Comments

msudgh picture msudgh  路  3Comments

mikekidder picture mikekidder  路  3Comments