instead of on-click attribute try on-tap ="_clicked" Op vrijdag 4 maart 2016 06:17:44 UTC-3 schreef [email protected]: > > I have an element that contains a dom-repeat, but the template for the > dom-repeat is from the element's Light DOM. (hope I've used the terms > correctly) > > <dom-module id="my-list"> > <template> > <content></content> > <template id="repeater" is="dom-repeat" items="items"> > </template> > </template> > </dom-module> > > To initialize the dom-repeat I do this: > > ready: function() { > this.$.repeater.templatize(Polymer.dom(this).querySelector("template")); > } > > > And to use my-list, from another element, I have this: > > <my-list> > <template> > <paper-item on-click="_clicked">Click Me</paper-item> > </template> > </my-list> > > > But when I click the item, I get the following error: > > [my-list::_createEventHandler]: listener method `_clicked` not defined > > For some reason, it is looking for the method in the my-list element, not > in the element that it's part of. > > iron-list doesn't have this issue. Any ideas how I can solve this? >
-- DISCLAIMER: *The information contained in this message may be confidential or privileged and is only intended for the use of the addressee. If you are not the intended recipient, you are requested by Qualogy to report this to the sender and to delete the message and you are notified that the use or distribution of the information contained in this message is strictly prohibited and unlawful.* 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/c1e818e2-a94f-4810-812e-7813b474c184%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
