[Vuejs]-Making a button link to another page that I also created

3👍

Add routes to your project

// routes example
[
  { path: '/', component: Main }, // some main component here
  { path: '/results', component: Res } // your Res component
]

Do not forget past <router-view /'> into App.vue

Use to property to create a linked button (you don’t need outer ‘a’ tag)

<v-btn to='/results' small color="blue">Click here to get results</v-btn>

Or :to='{name: 'results'}' if you named your routes.

<v-btn :to='{name: "results"}' small color="blue">Click here to get results</v-btn>
👤NaN

Leave a comment