ember.js - Possible to use application outlet when using nested routes? -
i have app based on posts. when nest routes this:
this.resource('posts', function() { this.route('post', {path: ':post_id'}); });
and try access /posts/id link render template if place {{outlet}} posts template.
here code working based on github. has functionality except renders parent outlets , not application outlet.
would possible have show, new or edit template render template in application {{outlet}}?
you can override rendertemplate(controller, model)
hook route , call this.render
:
rendertemplate: function(controller, model) { this.render('post', { into: 'appplication', // template render }); }
other options can pass outlet
(to select named outlet), , controller
(to use controller of choice).
see routing guide more details.
Comments
Post a Comment