Closed TanvirAlam closed 5 years ago
What you're doing is trying to have templates as strings parsed and rendered inline, which is possible, but not using an interpolator. What you'll want to do is use them from a partial {{>{ template: value }}}
, which will parse them as a template, giving you access to ractive features, and then render the resulting template. https://jsfiddle.net/f0pdu5ow/
@evs-chris Thank you that worked, I did not know.
Description:
I am generating templates with raw data:
The
{{value}}
has lot ofa-tags
eg:(First link E <a class="tree-node-pointer" title="Link to E" target="">Link to E</a>)
and I parse usingregex
to get the<a></a>
and dynamically adding:Everything is workin g just fine, however if I escape with
{{{ value }}}
The
on-click
event is there but its not working.Please help if you can
Created simple Jfiddle
https://jsfiddle.net/tanvir_alam_shawn/2Ltuvmj9/
Versions affected:
Ractive.js 1.2.4