declarative event handlers don't use {{ }}, it should be
on-click="_onCardClick"

On Sat, Jan 23, 2016 at 1:58 AM, <[email protected]> wrote:

> It does not work for me. Can anyone help?
> My code:
> <paper-card xheading="[[product.name]]" ximage="[[product.url]]"
> elevation="1">
>   <img src$="{{product.url}}" class="product-image"
> on-click="{{_onCardClick}}"></img>
>   <div class="card-content">
> ...
>
> _onCardClick: function(){
>      console.log('Click image event triggered.');
>    }
>
> On Wednesday, August 12, 2015 at 1:46:27 AM UTC+8, Escobita wrote:
>>
>> Hi aurelien and Kelly St. Jhon,
>>
>> I solved my problem changing a compatibility issue I had.  *Compatibility
>> note: The syntax differs from 0.5, which required curly brackets ({{}})
>> around the event handler name.*
>> Now my code looks like this:
>>
>>   <img class="card"
>>           style="background-color: lightgray;"
>>           preload src$="{{getImagePath(item.gsx$filename.$t)}}"
>>           on-click="onCardClick">
>>
>> Polymer({
>>   is:"my-portfolio",
>>  ...
>>   },
>>   onCardClick: function(){
>>       console.log("Card Clicked:");
>>   },
>>   ready: function() {
>>     }
>> });
>>
>>
>>
>>
>> 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/e963b400-9960-4981-afef-2782428d4604%40googlegroups.com
> <https://groups.google.com/d/msgid/polymer-dev/e963b400-9960-4981-afef-2782428d4604%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

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/CAJj5OwAMBX5F6K1ChEAw1sVzzKpGtehu%2Bsai1qa2Mpxfq78JOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to