swipely / aviator

Aviator is a single-page front-end router built for modularity.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Route matcher relies on ordering to distinguish named param from explicit route

flahertyb opened this issue · comments

Currently a routeLevel defined like this:

'/path': {
  '/:category': 'index',
  '/another_level': 'another_action'
}

and a route like this: /path/another_level

will not result in the expected behavior. The route matcher assumes that another_level is the namedParam value for category

commented

@flahertyb Its not about ordering.

lets say you have this:

'/path': {
  '/:category': 'index',
  '/:option': 'option'
}

What you'd expect to match?