Category "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>This is bar!</p>' }); And I want t

How to use vue router and vuex inside custom element from root?

I have project with nested custom elements. Now I need to vuex & vue router. How I can use this packages from root custom element and then use in all child

How do I pass data in $router.push in Vue.js?

I am creating an alert component for a CRUD app using Vue.js. I want a message to be passed to another component once data has been saved. Currently I am trying

In Nuxt, how do you pass data from layouts to pages?

For example, in my /layouts/sidebar.vue I have the following code: <template> <div class="mainContainer"> <nuxt :date-sidebar="'This is

How can i make sure a vuex action has finished before the page loads

I have 2 issues where i pull data from an api and use it. However, the page loads before the api request has completed. My first problem is in the router. I hav

vue-router redirect to default path issue

I want to default to a specific page when user navigates to the root path ie when used goes to myapp.com I want to redirect them to myapp.com/defaultpage My cu

How to access async store data in vue-router for usage in beforeEnter hook?

How is it possible to access store data in beforeEnter which is retrieved asynchronously via the store action? import store from './vuex/store'; store.dispatc

Do we have router.reload in vue-router?

I see in this pull request: Add a router.reload() Reload with current path and call data hook again But when I try issuing the following command from a Vue c

Failed to resolve component <router-view> VueRouter

I have a project build with Vue.js 3.2.13 and Vue-Router 4.0.14. I think I do everything right but the browser raises an error "[Vue warn]: Failed to resolve co

How to use router in vue composition api?

I defined a route in vue: /users/:userId Which point to UserComponent: <template> <div>{{username}}</div> </template> and I use

How do I overwrite a v-btn active class in Vuetify?

I am developing a website using Vue.js 2.6.10n with Vuetify 2.1.0 and vue-router 3.1.3. I have a v-app-bar with v-btns to link to my different pseudo pages an

ESLint Vue multiword components

Is there a way to stop getting error from ESLint for single word view name in Vue3? Every time I run ESLint, I get following message: 1:1 error Component na