Top "Vue-router" questions

Vue Router is a routing library for single-page applications designed for use with the Vue.

How to VueJS router-link active style

My page currently has Navigation.vue component. I want to make the each navigation hover and active. The 'hover' works …

vue.js vue-router routerlink
How can I go back/route-back on vue-router?

Ok, to explain this simply: I have 3x pages. Page 1 (Home) Page 2 (Menu) Page 3 (About) Page 1 has a- <router-link …

javascript webpack vue.js vuejs2 vue-router
Vue-router redirect on page not found (404)

I'm trying to redirect to 404.html on page not found using the router.beforeEach global hook, without much success (using …

http-status-code-404 vue.js vue-router
How can Vue router get current route path of lazy-loaded modules on page load?

I have a vue app with router set up like: import index from './components/index.vue'; import http404 from …

javascript vue.js vue-router
Enclosing a router-link tag in a button in vuejs

Can I wrap or enclose a router-link tag in a button tag? When I press the button, I want it …

button vue.js vue-router
Vue.js scroll to top of page for same route

I can set scrolling behaviour to Vue.js Router like this: const router = new Router({ mode: 'history', routes: [ { path: '/…

vue.js vue-router
Vue.js - Making helper functions globally available to single-file components

I have a Vue 2 project that has many (50+) single-file components. I use Vue-Router for routing and Vuex for state. There …

vue.js vue-router
Passing props to Vue.js components instantiated by Vue-router

Suppose I have a Vue.js component like this: var Bar = Vue.extend({ props: ['my-props'], template: '<p>…

vue.js vue-router
Accessing Vuex state when defining Vue-Router routes

I have the following Vuex store (main.js): import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) //init …

javascript vue.js vuejs2 vue-router vuex
Redirect to requested page after login using vue-router

In my application some routes are just accessible for authenticated users.When a unauthenticated user clicks on a link, for …

redirect vue.js vuejs2 vue-router