Bacancy Technology
Bacancy Technology represents the connected world, offering innovative and customer-centric information technology experiences, enabling Enterprises, Associates and the Society to Rise™.
12+
Countries where we have happy customers
1050+
Agile enabled employees
06
World wide offices
12+
Years of Experience
05
Agile Coaches
14
Certified Scrum Masters
1000+
Clients projects
1458
Happy customers
Artificial Intelligence
Machine Learning
Salesforce
Microsoft
SAP
August 14, 2023
vue-router doesn’t provide a reload method to reload the current route. But using the $router.go() we can achieve functionality to reload the current route.
Here’s an example to reload the current route using vue-router:
<template> <div> <h3>About</h3> <div> <button @click="reloadRoute">Reload</button> </div> </div> </template> <script> export default { methods: { reloadRoute() { this.$router.go(); } } } </script>
Alternatively, you can also use the window.location.reload method of Javascript to reload the current route.
<template> <div> <h3>About</h3> <div> <button @click="reloadRoute">Reload</button> </div> </div> </template> <script> export default { methods: { reloadRoute() { window.location.reload(); } } } </script>