You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{! index template}}{{render'some-name'someModel}}
<p>{{this}} - {{this.target}} - {{this.parentController}}</p>
<button{{action'thingInApplicationRoute'}}>
Should hit route!
</button>
In Ember 2.0 and 2.1, that action would bubble properly to the router (and then on to the application route). In Ember 2.2 and above this bubbling behavior is no longer present, unless the ember-legacy-controller addon is in use.
The root cause is that we no longer create the controller template local unless that addon is present (this was done in #12289 which landed in 2.2), however the {{render helper still grabs the controller local to specify target for the newly created controller instance (the controller local is looked up here and passed as the target here and here).
Given the following example:
In Ember 2.0 and 2.1, that action would bubble properly to the router (and then on to the application route). In Ember 2.2 and above this bubbling behavior is no longer present, unless the
ember-legacy-controller
addon is in use.The root cause is that we no longer create the
controller
template local unless that addon is present (this was done in #12289 which landed in 2.2), however the{{render
helper still grabs thecontroller
local to specifytarget
for the newly created controller instance (thecontroller
local is looked up here and passed as the target here and here).2.1 demo
2.2 demo
2.3 demo
2.4 demo
Working 2.4 demo with the legacy controller flag enabled.
The fix is to fallback to the previously looked up router instance if the
parentController
variable isundefined
. PR will be incoming shortly....The text was updated successfully, but these errors were encountered: