Answer the question
In order to leave comments, you need to log in
How to set query parameters for page root using routings?
Is it possible in Vue to set the root page parameters when accessing it using routing, it all works when going to the next steps, but it's not clear how to do it for the main page.
import Vue from 'vue'
import Router from 'vue-router'
import Home from "../components/Home"
import StepOne from "../components/Step1"
Vue.use(Router);
let router = new Router({
routes: [
{
path: '/',
name: 'Home',
component: Home,
},
{
path: '/step1',
name: 'step1',
component: StepOne
}
]
})
<router-link tag="button" class="btn btn-default" :to="{ name: 'step1, query: { plan: 'private' } }">Да</router-link>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question