Setup a watcher on the $route
in your component like this:
watch:{
$route (to, from){
this.show = false;
}
}
This observes for route changes and when changed ,sets show
to false
More Related Contents:
- Can we make vue.js application without .vue extension component and webpack?
- How to add external JS scripts to VueJS Components?
- How can I solve “Interpolation inside attributes has been removed. Use v-bind or the colon shorthand”? Vue.js 2
- Vue Router return 404 when revisit to the url
- How to import and use image in a Vue single file component?
- How to implement debounce in Vue2?
- Vuex – Do not mutate vuex store state outside mutation handlers
- Accessing Vuex state when defining Vue-Router routes
- Which command do I use to generate the build of a Vue app?
- vue-router — Uncaught (in promise) Error: Redirected from “/login” to “/” via a navigation guard
- Vue.js – How to remove hashbang #! from url?
- Mocking methods on a Vue instance during TDD
- Is it possible to emit from mounted in Vuejs?
- What is nextTick and what does it do in Vue.js?
- Passing props with programmatic navigation Vue.js
- Vue.js – update router view
- Laravel VueJs : `router-view` does not render the component
- How to make dynamic routes on the vue router?
- Detect Back Button in Navigation Guards of Vue-Router
- Pass an object as param to router.push ([email protected])
- Passing props to Vue.js components instantiated by Vue-router
- How to use microfrontends with Vue/Nuxt?
- Vuex – Computed property “name” was assigned to but it has no setter
- How to pass an object as props with vue router?
- VueJS: why is “this” undefined?
- How to call function on child component on parent events
- How to install jQuery into Nuxt.js?
- Can vue-router open a link in a new tab?
- Difference between v-model and v-bind on Vue.js?
- How to set a component non-reactive data in Vue 2?