Categories
Vue Answers

How to reload a page with Vue Router?

Spread the love

Sometimes, we want to reload a page with Vue Router

In this article, we’ll look at how to reload a page with Vue Router.

How to reload a page with Vue Router?

To reload a page with Vue Router, we can call this.$router.go().

For instance, we write

this.$router.go()

to reload the page.

this.$router.go() calls window.history.go to reload the page.

Conclusion

To reload a page with Vue Router, we can call this.$router.go().

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *