@Nitram wrote:
Hi,
I want to get name and width in px (element) of differents elements when they are created. I use
Ember.run
and “afterRender” for this, but I would like to use something else of jQueryThis is my code :
//controllers/build.js Ember.run.schedule('afterRender', this, () => { let columnsModelAttribution = Ember.A([]); let modelAttributionDiv = Ember.$(".containers-parent .report-container"); if(modelAttributionDiv.length > 0){ modelAttributionDiv.each((index) => { let name = 'example'; columnsModelAttribution.pushObject({name: name, 'width': Ember.$(modelAttributionDiv[index]).outerWidth()}); }); } }); }).on('init'),
I have too access to the object who help me to create element. Do you have any ideas ?
Thanks a lot
Posts: 3
Participants: 2