A
A
Artur Galyaev2021-04-25 13:03:45
Vue.js
Artur Galyaev, 2021-04-25 13:03:45

How to pass query when navigating to another page?

It is necessary that the query does not disappear when moving to another page

router.beforeEach((to, from, next) => {
    next({ query: from.query })
}

Vue.mixin({
  beforeRouteEnter(to, from, next) {
    next({ query: from.query })
  }
})

Does not work. Is it possible to do this or is it only through specifying in router.push?

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