real-world-vue
real-world-vue copied to clipboard
Mastering Vuex - Lesson 11 - event-create route in wrong order
The start tag's code for Lesson 11 has the event-create
and event-show
routes out of order. The "finish" tag's code has it fixed and course notes in the Mastering Vuex Orientation shows it setup right but I don't believe it's ever mentioned in the video that it needs to be reordered.
This:
export default new Router({
mode: 'history',
routes: [
{
path: '/',
name: 'event-list',
component: EventList
},
{
path: '/event/:id',
name: 'event-show',
component: EventShow,
props: true
},
{
path: '/event/create',
name: 'event-create',
component: EventCreate
}
]
})
Should be:
export default new Router({
mode: 'history',
routes: [
{
path: '/',
name: 'event-list',
component: EventList
},
{
path: '/event/create',
name: 'event-create',
component: EventCreate
},
{
path: '/event/:id',
name: 'event-show',
component: EventShow,
props: true
}
]
})
yes, I had the same issue and this is going to be a little bit confusing to the beginners
@amberwilson thanks. this fix also my issue wit 404 on json-server