0👍
✅
In your nuxt.config.js file add the following:
router: {
linkExactActiveClass: 'active'
}
nuxt doesn’t use an active class by default for active links.
Also you will need to use the <nuxt-link>
component for the active class to be bound to the active page link
https://nuxtjs.org/api/components-nuxt-link/
👤Nate
1👍
It turns out I was able to solve it with a little experimentation and it was remarkably simple.
- Set the default-active prop to $route.path
- Set the index of the item to it’s respective path
That is what worked for me, hopefully it helps someone in the future
Source:stackexchange.com