javascript - Decide on route-basis what outlet to render into -
So I have two different outlets in my handlabs markup. I name an outlet {{outlet}}
and its name is {{outlet mode}}
(I've implemented it like a model)
One requirement for the app is that I am doing that model Things to show in should be linkable. For example, the resource 'car' should be shown there, how can I create a link from / car / 52
and present it in that outlet, but how can I make a route rule like that ?
How can you render a route (like / cars /: car_id
) in a specific outlet?
Be careful, when you start to present for different shops You need to ensure that the outlet is also being provided (that is, it is a parent of the current route, such as the app).
App.CarsRoute = App.Route.extend ({renderTemplate: function () Template to present in this.render ('cars', {//: 'application', / To present in the route / outlet: 'Model', // Name of the outlet in the template controller of the route: the controller that uses the 'car' // template}}}}};
Comments
Post a Comment