-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render Helper cannot accept dynamic property as its first parameter, though the Partial Helper can? #9545
Comments
Whoops. Sorry about that. |
This was likely never implemented into the render helper, though I would consider it a bug for being inconsistent with To hopefully unblock you until this is fixed, you can likely accomplish what it is you're trying to do using just the view helper. If you need these objects backed by specific itemControllers, that can also be done by enumerating over an ArrayController and overriding http://jsfiddle.net/NQKvy/1495/ Edit: Updated to reflect the |
Ahh yes @jasonmit, that works very nicely! Thanks for that detailed jsfiddle example. |
@jasonmit Yeah, I find it strange too. Caught me of guard and I actually thought that I was doing something wrong untill I found both Github issues. |
Sorry for taking so long on a response here, but I'm going to close this now...
|
@rwjblue if your deprecating |
@petermumford Is #10093 not a suitable replacement? |
@petermumford if controllers are going away naturally this would go away. I am guessing, the recently merged |
@jbrown well, components have side effects, you can not use the same from a route then inside a template with {{render}}. |
@Krutius I'm not sure what you mean by components having side effects. I also don't understand your comment about controllers being more isolated. See also emberjs/rfcs#38 for future direction. |
Can I pass in a dynamic template name to a
render
call in Handlebars for Ember.js?I'm attempting to create a component (a filter table) that accepts a run-time property that specifies exactly what template to render while looping over a collection of objects. My code works fine when using the
partial
helper to leverage a dynamic property parameter for the first parameter passing in a abodyTemplate
property on the parent component like:but fails when I use the
render
helper call in the same way like:The error that gets logged to the console is:
Though this seems to be a separate issue from the inability to set up controller bindings in render helper calls like #1914 describes, but are these two issues related? I intend to debug look into this further, but I wanted to see if anyone had some initial feedback.
The text was updated successfully, but these errors were encountered: