Try to search your question here, if you can't find : Ask Any Question Now ?

Vue router reloading the current route

HomeCategory: stackoverflowVue router reloading the current route
Avatarpushpa asked 5 months ago

Without reloading the whole page I need to reload the current route again (Only a component reload) in a vue app.

I am having a path in vue router like below,

  path: "/dashboard",
  name: "dashboard",
  component: loadView("Dashboard"),


When user clicks on the Dashboard navigation item user will be redirected to the Dashboard page with vue router programmatic navigation

this.$router.push({ name: "dashboard" });

But when user already in the dashboard route and user clicks the Dashboard nav item again nothing happens. I think this is vue router’s default behaviour. But I need to force reload the Dashboard component (Not to refresh the whole page).

I can’t use beforeRouteUpdate since the router is not updated. Also I have tried the global before guards like beforeEach. But it is also not working.

How can I force reload the dashboard component without reloading the whole page?

1 Answers
Best Answer
AvatarMikhail answered 5 months ago
Your Answer

7 + 9 =

Popular Tags

WP Facebook Auto Publish Powered By :