renderTemplate (controller, model) public
A hook you can use to render the template for the current route.
This method is called with the controller for the current route and the model supplied by the model
hook. By default, it renders the route's template, configured with the controller for the route.
This method can be overridden to set up and render additional or alternative templates.
App.PostsRoute = Ember.Route.extend({ renderTemplate: function(controller, model) { let favController = this.controllerFor('favoritePost'); // Render the `favoritePost` template into // the outlet `posts`, and display the `favoritePost` // controller. this.render('favoritePost', { outlet: 'posts', controller: favController }); } });
Parameters:
-
controller
Object
- the route's controller
-
model
Object
- the route's model
Please login to continue.