How to redirect to another page with Vue.js?

Sometimes, we want to redirect to another page with Vue.js.

In this article, we’ll look at how to redirect to another page with Vue.js.

How to redirect to another page with Vue.js?

To redirect to another page with Vue.js, we can use the this.$router.push method.

For instance, we write

this.$router.push('home') 

to call push with the 'home' route path to go to /home route.

Conclusion

To redirect to another page with Vue.js, we can use the this.$router.push method.