Skip to content

Instantly share code, notes, and snippets.

@timani
Created May 29, 2013 03:54
Show Gist options
  • Save timani/5667861 to your computer and use it in GitHub Desktop.
Save timani/5667861 to your computer and use it in GitHub Desktop.
If you want to render two different templates into outlets of two different rendered templates of a route: - http://emberjs.com/guides/routing/rendering-a-template/ Ember.js
App.PostRoute = App.Route.extend({
renderTemplate: function() {
this.render('favoritePost', { // the template to render
into: 'posts', // the template to render into
outlet: 'posts', // the name of the outlet in that template
controller: 'blogPost' // the controller to use for the template
});
this.render('comments', {
into: 'favoritePost',
outlet: 'comment',
controller: 'blogPost'
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment