2
votes

I have a Parent route named engineering. Every route extends a Base.js route which renders the default template as well as another custom one into the named outlet:

renderTemplate: function (controller) {
    this.render();

    this.render('page-title', {
        outlet: 'pageTitle',
        controller: controller,
    });
},

There is a engineering.hbs parent template which contained two outlets. The Main {{outlet}} and another {outlet 'pageTitle'}}.

This works perfecly fine for routes like /engineering/index and engineering/someothersite, but the pageTitle outlett just doesn't render at all for routes like engineering/college/courses/description.

Any Suggestions, or perhaps even a better way of passing data from a child route to the parent template?

2

2 Answers

1
votes

Figured it out. For future visitors, the issue was not including the into property in the render method.

this.render('page-title', {
    outlet: 'pageTitle',
    into: controller.topParent,
    controller: controller,
});

controller.topParent is my own property.

0
votes

I would encourage to use ember-elsewhere addon for this purpose instead of using the named outlet.