Skip to content
Discussion options

You must be logged in to vote

One option you can consider is in the beforeLoad of your garage route, adding a redirect. for example

beforeLoad({ location }) {
  if (location.pathname === "/house/garage")
    throw redirect({ to: "/house/garage/car" })
}

Alternatively, if garage is simply an outlet, then you should probably show a 404 page at that route instead of having garage as a parent of car. (Note, I have not extensively used file based routing so my assumption here may be incorrect) but at the moment, it sounds like you have

  • house
    • garage
      • car

When really you might want something more like

  • house
    • garage/car

My understanding based on the File-based routing docs is that you can do this using a folder str…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@brucewongqbio
Comment options

Answer selected by brucewongqbio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants