How to generate URL with form for vue-router?

Viewed 5401

I am trying to create search bar(form), but I need it to have pretty URL but I am using Vue-router so my app.js looks like this

let Search = Vue.component('search', require('./components/Search.vue'));
const routes = [
    { path: '/protocols/:param', component: Search },
]

now functionally when I type /protocols/test I get my desired results, but I am not sure how to create a form so when I type something to redirect me to that route /protocols/:param since my page is vue component

<form action="/protocols/?what goes here?">
    <input type="text" placeholder="Search..." class="" name="" id="search">
</form>

since all tutorials are made for search on the same page, but I need to dedicate one for results

1 Answers
Related