Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4835

Howto share subroutes without duplicating them?

$
0
0

@Rick_Meertens wrote:

Hi Guys,

How can I re-use subroutes in multiple routes..

For example(comments is the subroute I want to re-use/share):

this-route('/posts/edit/', {path: /posts/:post_id/edit }, function() {
  this.route('comments');
});

this-route('/posts/view', {path: /posts/:post_id/view }, function() {
  this.route('comments');
});

//The following coments view is showing an empty table..
this-route('/posts/new', function() {
  this.route('comments');
});

Do I have to dupplicate the route named: 'comments.js' or...?

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4835

Trending Articles