Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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]'}}); 
Comment

vue redirect page on button click

<button @click="$router.push('/path')">Go to</button>
Comment

PREVIOUS NEXT
Code Example
Javascript :: open new tab with javascript 
Javascript :: react native navigation hide navbar 
Javascript :: js preventdefault 
Javascript :: installing node on ec2 instance 
Javascript :: how to change my npm version 
Javascript :: title case javascript 
Javascript :: javascript convert hex color to rgb 
Javascript :: get the placeholder value jquery 
Javascript :: firstElementChild jquery equivalent 
Javascript :: Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. 
Javascript :: javascript reset scroll position 
Javascript :: js string for each char 
Javascript :: nexe error: vcbuild.bat nosign release x64 exited with code: 1 
Javascript :: how to convert number to array in javascript using Array.from 
Javascript :: helmet graphql playground 
Javascript :: string to number angularjs 
Javascript :: javascript Convert an array of strings to numbers 
Javascript :: collision circle 
Javascript :: angular component between tags 
Javascript :: clearinterval in useeffect 
Javascript :: check if element is hidden jquery 
Javascript :: android resource linking failed react native image crop picker 
Javascript :: adding delay in javascript foreach loop 
Javascript :: mongoose connection nodejs 
Javascript :: byte to gb javascript 
Javascript :: randome words api 
Javascript :: how to add react scroll scrollable link 
Javascript :: javascript repeat element in array 
Javascript :: math rock 
Javascript :: js document.getelementsbyclassname modify innertext 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =