K
K
KushchO2019-03-19 19:50:51
Vue.js
KushchO, 2019-03-19 19:50:51

How to timer change route in Vue.js?

I just started learning vue.js. I have a question, is there a way to change routes using setInterval() , for example?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lumore, 2019-03-19
@KushchO

export default {
  created () {
    setTimeout(() => {
      this.$router.push('/contacts')
    }, 5000)
  }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question