Skip to content

Under what circumstances will the value in the parmas of vue router be a string array? #2289

Closed Answered by skirtles-code
Bo-Teng asked this question in Help and Questions
Discussion options

You must be logged in to vote

For repeatable params. See https://router.vuejs.org/guide/essentials/route-matching-syntax.html#Repeatable-params.

e.g.:

const routes = [
  // matches /one, /one/two, /one/two/three, etc.
  { path: '/:chapters+' },
  // matches /, /one, /one/two, /one/two/three, etc.
  { path: '/:chapters*' },
]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Bo-Teng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants