@jasen_gottlieb
In Ember.js, you can define a route name for a nested resource by following these steps:
1 2 3 |
this.route('posts', function() { // Nested routes go here }); |
1 2 3 |
this.route('posts', function() { this.route('comments'); }); |
1 2 3 |
this.route('posts', function() { this.route('comments', { path: '/:post_id/comments' }); }); |
In this example, the route name for the comments
resource is comments
, and the path for the route is set to /:post_id/comments
.
By following these steps, you can define a route name for a nested resource in Ember.js.