swipely / aviator

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

Allow adding options without a method #15

Closed hojberg closed 11 years ago

hojberg commented 11 years ago

By allowing options without a method we can add options to a sub set of routes:

Aviator.setRoutes({
  '/users': {
    target:     usersTarget,
    '/*':       { options: { bartyMcFly: true },
    '/:uuid':   'show',
    '/recent':  'listRecent'
  }
});

@barnabyc @flahertyb

flahertyb commented 11 years ago

+1 render those cats

barnabyc commented 11 years ago

Nice!