vue-router@4.0.11 can't match route

Viewed 129

I've the following route passed to vue-router:

{
  path: "/(lat/:lat/lng/:lng)?",
  meta: { private: true }
}

It should match /, or /lat/1/lng/2. But, when I try to start the web app at /, the page gets stuck in an infinite loop, throwing the warning [Vue Router warn]: No match found for location with path "/".

Any idea why is this happening? Am I doing something wrong, or is it a vue-router issue?

Note: I've tried to use aliases, and set the route alias to "/(lat/:lat/lng/:lng)?", it works, but it throws the warning: [Vue Router warn]: Alias "/lat/:lat/lng/:lng" and the original record: "/" should have the exact same param named "lat"

0 Answers
Related