Answer the question
In order to leave comments, you need to log in
Navigating through pages with the get parameter. How to implement in vue.js?
There is a page with a search on it. After pressing the "search" button, the parameter ?search='search string' is passed to the string.
Nothing happens. We put the cursor in the address bar of the browser, press enter - Voule, the search was successful (I mean that the search works).
<router-link :to="{name: 'index-page', query: {search: search}}">Найти</router-link>
Answer the question
In order to leave comments, you need to log in
There is no route change, so the router is silent. When you place the cursor and press enter, the browser forces the page to load at the specified path. And it seems that the logic for working with request parameters is sitting somewhere in the component life cycle hooks and they do not work in your version.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question