K
K
KoRNeT46RuS2019-12-12 16:21:18
Vue.js
KoRNeT46RuS, 2019-12-12 16:21:18

Why is $route not updated?

I have a link

<router-link  :to="page.url">{{page.title}}</router-link>

, where
let query = this.cloneObject(this.$route.query);
query.page = this.paginator.page + 1;
page.url = {path: this.$route.path, query: query};

It comes out great. But when you click on the link, the url changes in the browser, but the old this.$route object remains in vue. In theory, it should be updated to a new one when switching to another page. But it doesn't update here. I'm scratching my head why.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
KoRNeT46RuS, 2019-12-12
@KoRNeT46RuS

Understood. The send function to the server was before next()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question