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

PREVIOUS NEXT
Code Example
Javascript :: create component with COUNT 
Javascript :: encrypt & decrypt api data in localstorage 
Javascript :: forintlol 
Javascript :: autosize a textarea using Prototype 
Javascript :: fly: Javascript 
Javascript :: js create element with attributes 
Javascript :: how to generate an onclose jest 
Javascript :: how to cancel placing a block in skript 
Javascript :: express serve node module 
Javascript :: does pycharm community edition support javascript 
Javascript :: JAVASCRPITMAMA 
Javascript :: node.js workflow template 
Javascript :: expressions meaning in bengali 
Javascript :: negate expression prolog 
Javascript :: convert to arrow functions 
Javascript :: useEffect es6 format 
Javascript :: For Anweisung 
Javascript :: nuxt two props 
Javascript :: Jasonplaseholder 
Javascript :: Mongoose make Object required 
Javascript :: organize api calls react native folder 
Javascript :: Process.ChildProcess._handle.onexit 
Javascript :: js convert urls in content to links 
Javascript :: createelement and set prop attr jquery 
Javascript :: Nested comparison operator in Javascript 
Javascript :: how to get the value of state of on and off 
Javascript :: destructuring interfaces in the most simple way <<Java Script 
Javascript :: Find speacific object from an array in javascript 
Javascript :: Pausing setInterval when page/ browser is out of focus 
Javascript :: nodejs express use streams 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =