Answer the question
In order to leave comments, you need to log in
[vue-router] Redirect to another page not working?
good afternoon, I ran into such a problem that when switching to another page using this.$router.push({ hash: "settings" }) the transition does not occur
routes in the component :
routes: [
{
path: "/settings",
name: "app-settings",
component: Settings,
},
{
path: "/leasing/paymentshedule/:uuid",
props: true,
children: [
{
path: "",
component: PaymentSheduleEditSectionBase,
name: "leasing-ps-edit",
props: { PaymentSheduleModel: PaymentSheduleModel },
},
{
path: "details",
component: PaymentSheduleEditSectionDetails,
name: "leasing-ps-edit-details",
props: { PaymentSheduleModel: PaymentSheduleModel },
},
{
path: "api",
component: PaymentSheduleEditSectionApi,
name: "leasing-ps-edit-api",
props: { PaymentSheduleModel: PaymentSheduleModel },
},
],
},
],
beforeRouteLeave(to, from, next) {
this.showLeaveModal = true
this.nextRoute = to.path;
}
onSave() {
this.showLeaveModal = false;
this.$router.push({ hash: this.nextRoute });
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question