This content originally appeared on CodeSource.io and was authored by Prince Chukwudire
Core to the simplicity heralded in Vuejs is its router component (Vue router). Apart from offering dynamic routing and allowing the user to pass in params during routing, the router is also capable of allowing one to do a total re-route to a different URL.
Vue router redirect example
This is similar to what vanilla Js offers us in
window.location.href = "some url"
Here’s how to achieve the same using the vue router:
router.push("some url")
The post Page reroute with Vue – Vue router redirect example appeared first on CodeSource.io.
This content originally appeared on CodeSource.io and was authored by Prince Chukwudire
Prince Chukwudire | Sciencx (2021-02-18T16:41:19+00:00) Page reroute with Vue – Vue router redirect example. Retrieved from https://www.scien.cx/2021/02/18/page-reroute-with-vue-vue-router-redirect-example/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.