javascriptcordovaphonegap-buildhtml-framework-7dom7

How to use js onclick function with data binding ? [Framework7]


I'm using Framework7 with the cordova social sharing plugin and I’m trying to use it onclick like this :

<a onclick='window.plugins.socialsharing.share("{{event_url}}")' class="link"><i class="material-icons md-only">share</i></a>

Also, with my infinite scroll, I append new cards to DOM like that :

<a onclick=\'window.plugins.socialsharing.share("'+data[i].event_url+'")\' class="link"><i class="material-icons md-only">share</i></a>

But when I build it, only the second one works, The first one open the cordova share but the content is empty !

Looks like it’s a quote issue but, but I don’t understand how to solve this..

Do you know why ?


Solution

  • I finally found a solution (but still weird..)

    I had to add target="_system" and external class to my link