Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mastering Vuex - Lesson 11 - event-create route in wrong order #22

Open
amberwilson opened this issue Apr 18, 2020 · 2 comments
Open

Mastering Vuex - Lesson 11 - event-create route in wrong order #22

amberwilson opened this issue Apr 18, 2020 · 2 comments

Comments

@amberwilson
Copy link

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
    }
  ]
})
@vighneshwho
Copy link

vighneshwho commented May 2, 2020

yes, I had the same issue and this is going to be a little bit confusing to the beginners

@git001
Copy link

git001 commented Sep 26, 2020

@amberwilson thanks. this fix also my issue wit 404 on json-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants