In my controller (build.js), I have an observer on “elements.”.
When a new item is add in elements, my observer works.
This observer add item in the template.
I add Ember.run, because, I can’t have access of the item add in the template at the end of this observer.
But in my Ember.run, I want two things :
The width of the item who be add on the template (in jQuery i think)
The ID of this item (in object accessible in the observer)
Do you know a method for make a each on all items add on the template (width an object) and find the item with my object in the DOM.
This sounds like you’re manually trying to do what would happen automatically if you use an each in your template. No observers should be needed for this kind of thing, and they’re hard to use without introducing bugs.
You have two choices for automatically rerendering a list. You can use a native array and replace the whole array each time you want different items in the list, like