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
{{control}} inside {{each}} is broken #1990
Comments
I noticed the same thing and was able to get it working by registering the controller as a singleton right after Ember.Application.create. Reader = Ember.Application.create({}); |
Also {{control}} inside {{collection}} has the same problem. @schmidp solution works great! |
I tried to set controlID when using {{control}}, doesn't work for me, I still have this issue. {{#each widgets in controller}}
{{control "widget" widgets controlID="{{widget.id}}"}}
{{/each}} Is there something wrong with my source code? |
ya, you can't use On Thu, Feb 14, 2013 at 2:52 PM, Benjamin Netter
|
Is there any other workaround for this? |
+1 any work around? Additionally, how do you properly set the flag so you can use |
I did it like this: window.ENV = window.ENV || {}; But before loading ember.js On Feb 20, 2013, at 8:34 PM, Ryan Mathews notifications@github.com wrote:
|
Thanks @schmidp that let me be able to start using it and see the problem as mentioned above. I wish there was more information about how to do reusable views. I've seen two potential options ( Update |
My workaround does not seem to work anymore. I think {{control}} should support non singleton controllers as {{render}} does, but I don't think I know enough about ember.js to implement this. @wycats: do you have some insights or plans with {{control}} regarding this issue? |
Here's a completely feasible use case: you have an array that needs to be rendered as controls. You write this template:
The problem is the same controller is used for every widget. Passing in a different
controlID
option each time solves this problem. PerhapscontrolID
should be path that we can we make it a CP on the view or on the controller.Edit: I've provided a fiddle http://jsfiddle.net/twinturbo/cH27A/. Seems it's more related to ArrayProxy then each. A loop of simple
Ember.Objects
works correctly.The text was updated successfully, but these errors were encountered: