Answer the question
In order to leave comments, you need to log in
Error in Vue-Router: "NavigationDuplicated: Avoided redundant navigation to current location"?
good afternoon, maybe someone has already encountered such a problem,
there is a "create order" button in the "header" of the page on which this.$router.push({ name: 'item', params: { id: id.v4) () } }) and a new id is generated, which is inserted into the address bar, but when trying to create a new order from the new order card (i.e. we clicked on create a new order, we are transferred to a new, just created new order card and from we try to click "create order" again) an error occurs: "NavigationDuplicated: Avoided redundant navigation to current location ..."
tried to use this.$router.push...catch(() => {} did not help, even it is not possible to use router's hooks, because the error
{
path: ' immediately occurs/order-item',
component: OrderItem,
meta: {
title: 'Order'
},
children: [
{
path: '/order-item/:id',
name: 'order__item',
component: OrderItem,
meta: {
title: 'Order'
}
}
]
}
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