navbar links in nuxt
See original GitHub issueI’m using bootstrap-vue in my nuxt project. I have created some navbar with some links of my pages.
`<b-navbar toggleable="md">
<b-navbar-toggle target="nav_collapse" class="ml-auto"/>
<b-collapse id="nav_collapse" is-nav>
<b-navbar-nav class="mx-auto">
<b-nav-item class="mx-auto" to="/">home</b-nav-item>
<b-nav-item class="mx-auto" to="/booking">Booking</b-nav-item>
<b-nav-item class="mx-auto" to="/gallery">Gallery</b-nav-item>
<b-nav-item class="mx-auto" to="/faq">FAQ</b-nav-item>
<b-nav-item class="mx-auto" to="/contact">Contact</b-nav-item>
</b-navbar-nav>
</b-collapse>
</b-navbar>`
I think there is a problem when using links who goes to=“/” they are always selected. You can see a picture on the fallowing link http://prntscr.com/jj2zlz
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Adding a Navbar to Nuxt Apps - A Vue.js Lesson From our ...
Adding a Navbar to Nuxt Apps. In this lesson, we're exploring where to put your navbar and other parts of your application that...
Read more >Navbars, footers, and menus with Nuxt - Prismic
Learn how to create menus in Nuxt. ... In the Group field, we added a Link field and a Rich Text field; this...
Read more >Navigation drawer tutorial with Nuxt | Codementor
Simple responsive navigation drawer built with Nuxt.js.
Read more >Built-in Components - Nuxt
The linkActiveClass works the same as the vue-router class for active links. If we want to show which links are active all you...
Read more >navbar active tab using using nuxt/vue - Stack Overflow
Instead of using <a> tags, use <nuxt-link> . Then, in your css, style the .nuxt-link-exact-active class— for example:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Router props are applied directly to
<b-bropdown-item :to="href" active-class="foo" exact>
, just like theto
prop.Take a look at the router docs. Prop
exact
is what you want: https://router.vuejs.org/en/api/router-link.html