Created
December 2, 2014 13:56
-
-
Save aroberts/79893d5bf7e4a4039ea5 to your computer and use it in GitHub Desktop.
Ember nested resources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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