Answers for "button click redirection to another page vue"

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

Code answers related to "button click redirection to another page vue"

Code answers related to "Javascript"

Browse Popular Code Answers by Language