Is it possible to get the elements that will be/were rendered from a <template repeat>?
I have a component called poly-list, implemented below:
style="overflow: hidden; min-width: 324px; display: inline-block;"> <template> <div on-click="{{ testClick }}"> <paper-input-no-error value="{{ [0] }}" class="in-paper-input" on-change="{{ inChanged }}" id="0"></paper-input-no-error>
<paper-input-no-error value="{{ [1] }}" class="in-paper-input" placeholder="Value" id="1"></paper-input-no-error> </div> </template> </poly-list>I then activate the template in the domReady callback:
this.template.model = this.data;
this.template.setAttribute('repeat', '');
I need a way to get each individual element that the template will put into the DOM. I need to do this in order to add an event listener to each component that is rendered. I also want this to be encapsulated in my poly-list components so components implementing poly-list will not need to setup the event itself.
Is there an event that will return each element as it is rendered or something similar?
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/74312825-9322-4cec-ab52-8fe34b0ddbbf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<poly-list data="{{ data.in }}">
<template>
<div> <!-- on-click on this element without user defining it -->
<span>Repeated content</span>
</div>
</template>EDIT TO ORIGINAL POST: I did not mean to include the on-click event on the div in my code. This was for an example of where the on-click event should be.
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/231d8198-1f2f-47ec-a934-57346fb19c54%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CA%2BrMWZhb%3DUQe0ArGbgUJ%3DUvmAoavj6aM6diMvK3CNzJMA%3DNE1w%40mail.gmail.com.
<poly-list data="{{ data.in }}">
<template>
<div> <!-- on-click on this element without user defining it -->
<span>Repeated content</span>
</div>
</template>
</poly-list>