[Regression] render helper not targetable by render({into:...})
Possible regression here...Here's a JSBin, works in 1.10 release but not in beta or canary
http://emberjs.jsbin.com/pefuki/1/edit?html,js,output
Running into an issue in the appendLiveRoute function when I explicitly pass into as an optional parameter to this.render()
https://github.com/emberjs/ember.js/blob/c10362b973f7b311115eafd39fa2b01deb4561ed/packages/ember-routing/lib/system/router.js#L1023
As currently set up the only way I can get this to work is to change the this.render() to render into: application
this.render(template, {
into: 'application',
outlet: 'modal-box'
});
But it still doesn't hold parity with latest release, If I do that then it will error
TypeError: Cannot read property 'connectOutlet' of undefined
Thanks for putting together the JSBin. This is indeed a regression.
@rwjblue, this should probably go in the 1.11.0 milestone but I leave that up to you.
I can see how to fix it, but it will be kinda gross. render is a thorn in our side that I will be very happy to axe in 2.0.
Sketch of how we can tack this old behavior onto the new infrastructure:
- the outlet view will need to notice occurrences of the
renderhelper in its ancestors (probably by looking athelperName), and if it finds one, grab its outlet state from there instead of going up to the next outlet. - the router will use
_activeViewsto inject the appropriate outlet state into therender-inserted view.
@ef4 Thanks!
@ef4 Running into an issue since upgrading to 1.11 regarding code that changed in this area. I'm using the ember-modals addon which makes a call to this.render from a route with a template name and some options specifying how to render the template. The issue is that appendOrphan gets called but impersonateAnOutlet does not get called at all which is what sets the wasUsed value. I think this may be because impersonateAnOutlet only gets called in the renderHelper and not when calling this.render from a route. Is this an issue with the addon not setting things up correctly or a regression? Is there any other details I can provide for you?
@drobannx please file a new issue, that sounds like a different problem.