M
M
Max99992020-08-30 14:19:27
Vue.js
Max9999, 2020-08-30 14:19:27

Get this in router vue?

Good afternoon.
Tell. There are routes. I need to hang processing when passing through them so that this is available. You can get it in beforeRouteLeave, but I don’t understand how to add it to component

Vue.use(VueRouter)
const routes = [
   {
    path: '/',
    name: 'Home',
    meta: {layout: 'home', url: 'home'},
    component:  () => import('../views/Home.vue')
  },
]

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question