samedi 24 janvier 2015

Re-use template code in Ember

I've got a few routes set up like this:



this.route('posts', { 'path' : 'blog/' }, function() {
this.route('category', { 'path' : 'category/:category' });
this.route('post', { 'path' : '/:permalink' });
});


On posts I show all posts, on category only the ones specific for this post-category and on post only a single post.


All could re-use the same template to render a post but I don't quite understand how to accomplish this.


Can you explain me how to to this?





Aucun commentaire:

Enregistrer un commentaire