0👍
Look for a required id param in a route definition, perhaps like,
{
name: "editUser",
path: "/user-edit/:id",
component: EditUser,
}
Make it optional with a "?" –
{
name: "editUser",
path: "/user-edit/:id?",
component: EditUser,
}
- [Vuejs]-How can I use router.back() in vue without a button
- [Vuejs]-Vue.js- How is the value of v-model and this.pageNumber are changing according to the pagination?
Source:stackexchange.com