Reputation: 7068
I'm using nested {{render}}
in a view and for some reason the nested {{render}}
is causing issues.
In the console I get:
Uncaught TypeError: undefined is not a function
That error has a backtrace and references what looks like one of my files (I believe it is the compiled version of the template). In points to the render function and to this line:
inline(env, morph0, context, "render", ["studentItem", get(env, context, "model.studentItemsSorted.firstObject")], {});
The code that is referencing is my template:
{{ render "studentItem" model.studentItemsSorted.firstObject }}
I've taken out the loop, just trying to debug why this is failing. {{model.studentItemsSorted.firstObject}}
by itself does have the correct object.
If I move that {{render}}
to the top level, right next to the first one, then it works as expected.
The controller is super basic. I've actually ripped everything out of it and the template (except for what is above) and it still fails. What else might affect the context? There is no router.
I've tested out this concept in a JSBin and it works as expected there. Nested {{render}}
calls have no problem.
Any help is appreciated. Thank you.
Ember Inspector 1.7.3
Ember 1.11.1
Ember Data 1.0.0-beta.16.1
jQuery 1.11.2
Ember-CLI 0.2.3
Upvotes: 0
Views: 44
Reputation: 876
This is a regression in Ember 1.11 but if this is a new feature I'd recommend trying to build it with components instead of relying on render
.
Here's your JSBin modified to use components.
Upvotes: 2