Skip to content

Instantly share code, notes, and snippets.

@rmurphey
Last active December 10, 2015 01:38
Show Gist options
  • Save rmurphey/4360902 to your computer and use it in GitHub Desktop.
Save rmurphey/4360902 to your computer and use it in GitHub Desktop.
App.Router.map({
'/': 'home',
'/foo/:bar': 'fooBar',
'/route/with/nested/routes': {
handler: 'handler',
routes: {
'/moar/routes/plz': 'boom'
}
}
});
// should be equivalent to ...
App.Router.map(function(match){
match('/').to('home');
match('/foo/:bar').to('fooBar');
match('/route/with/nested/routes').to('handler', function(match){
match('/moar/routes/plz').to('boom');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment