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
It seems that {{yield}} template gets incorrect context if it's called from inside an {{#if}} block.
Working fiddle with ember 1.9.1: http://emberjs.jsbin.com/roboqegege/1/edit
As you can see, context is as expected: this and this.controller lead to controller and this.view lead to view instance.
I'm encountering a similar problem. Maybe my approach is wrong and this is a feature, but when inside a controller template I wrap a {{yield}} inside an {{#if}}, the content does not get rendered. I use Ember 1.11.1. Here's a jsbin: http://emberjs.jsbin.com/yakixihedi/1/edit?html,js,output
Inside a view's layout:
It seems that {{yield}} template gets incorrect context if it's called from inside an
{{#if}}
block.Working fiddle with ember 1.9.1: http://emberjs.jsbin.com/roboqegege/1/edit
As you can see, context is as expected:
this
andthis.controller
lead to controller andthis.view
lead to view instance.The same code in 1.10: http://emberjs.jsbin.com/zerodanuhe/3/edit
To get the code working, change layoutName from
"holder"
to"holder_working"
. This is the same template as before, only without an{{#if}}
block.The text was updated successfully, but these errors were encountered: