Skip to content

Instantly share code, notes, and snippets.

@alexspeller
Created June 9, 2013 15:31
Show Gist options
  • Save alexspeller/5743945 to your computer and use it in GitHub Desktop.
Save alexspeller/5743945 to your computer and use it in GitHub Desktop.
// Messages and detail routes are rendered inside the thing template.
// The thing template should have an {{outlet}} where the sub-routes should be rendered
App.Router.map(function(){
this.resource('thing', {path: 'things/:thing_id'}, function() {
this.resource('messages');
this.resource('detail');
});
});
// Only one of these routes will show at a time
App.Router.map(function(){
this.resource('thing', {path: 'things/:thing_id'});
this.resource('thingMessages', {path: 'things/:thing_id/messages'});
this.resource('thingDetail', {path: 'things/:thing_id/detail'});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment