5
votes

I have searched for an answer to this but was unable to find one. The ember app I am working on is throwing a console error:

WARNING: The immediate parent route did not render into the main outlet and the default 'into' option may not be expected 

I did find this that proposes a fix: https://github.com/emberjs/ember.js/pull/1838 but was unsure how to implement it.

The bit of code from our app that is causing this is from the route renderTemplate function:

   renderTemplate: function(controller, model) {

        this.render({outlet: 'page'});
        this.render('stageSidebar', {outlet: 'stage_sidebar'});

    }

The trouble comes from calling "this.render" more than 1X in a renderTemplate function.

Everything is rendering correctly, all data is populating, but these errors are driving me crazy in the console and I was wondering if anyone has run into this or has more info on the fix in the link above?

Thanks!

1
<chants> bounty, bounty, bounty! - Beez
Could you provide a jsbin? This is usually called because you are rendering into an outlet that descends from the application route, but the application route was never rendered. Also, since this question was posted the router is more verbose about what route was missing: github.com/emberjs/ember.js/pull/2437 - Cory Loken

1 Answers

0
votes

Try:

this.render('<template name>', {outlet: 'page', into: '<parent template name>'});