Answers for "navigate to another page on vue js button"

1

button click redirection to another page vue

<button @click="goToHome()"> </button>

//inside the script section, define the function:
 methods:{
   goToHome(){
   this.$router.push('/home'); 
      }
  }

//if the route accepts params, you can also use
this.$router.push({name:'home', params: {id: '[paramdata]'}});
Posted by: Guest on October-31-2020
0

navigate to another page on vue js button

his.$router.push('/home');
Posted by: Guest on July-21-2021

Code answers related to "navigate to another page on vue js button"

Code answers related to "Javascript"

Browse Popular Code Answers by Language