swipely / aviator

Aviator is a single-page front-end router built for modularity.
MIT License
143 stars 6 forks source link

Add Aviator.rewriteRouteTo #42

Closed hojberg closed 10 years ago

hojberg commented 10 years ago

Add simple helper for route descriptions so you can write things like this:

Aviator.setRoutes({
  '/foo': {
    '/bar': Aviator.rewriteRouteTo('/baz')
  },
  '/baz': {
    target: bazTarget,
    '/': 'index'
  }
});

This fixes https://github.com/swipely/aviator/issues/34

@barnabyc @flahertyb