Closed hankphung closed 8 years ago
First, you should use on-tap
(Polymer listeners) instead of onclick
(plain JS).
And another thing: you cannot pass item like this when using Polymer listeners, so the correct syntax is:
<paper-button on-tap="_onItemTap"> E </paper-button>
Then, pay attention to e.model
inside of the listener:
_onItemTap: function (e) {
console.log('Title: ' + e.model.item.title);
}
The same approach works for dom-repeat
templates as well.
@web-padawan Thank you, it work now. This gonna help when put in the element demos.
I pass item as param like this and got error item not defined
```