I use beforeRouteLeave for open dialog component when calling component with router.
beforeRouteLeave(to, from, next) {
if (to.name === "read-content") {
this.displayProductModal(to);
} else {
next();
}
},
When I call nuxt-link to the read-content (route.name) page a dialog opens. Sometimes I don't want to run the dialog. But I want to access that page directly, what should I do?