Skip to content

Instantly share code, notes, and snippets.

@aroberts
Created December 2, 2014 13:56
Show Gist options
  • Save aroberts/79893d5bf7e4a4039ea5 to your computer and use it in GitHub Desktop.
Save aroberts/79893d5bf7e4a4039ea5 to your computer and use it in GitHub Desktop.
Ember nested resources
// first example
App.Router.map(function () {
this.resource('address', { path: '/:address_id' }, function() {
this.resource('thread', { path: '/:thread_id' });
});
this.resource('tag', { path: '/tag/:tag' }, function() {
this.resource('thread', { path: '/:thread_id' });
});
});
// second example
App.Router.map(function () {
this.resource('address', { path: '/:address_id' }, function() {
this.resource('address.thread', { path: '/:thread_id' });
});
this.resource('tag', { path: '/tag/:tag' }, function() {
this.resource('tag.thread', { path: '/:thread_id' });
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment