Hi everyone! I’ve been trying to do this without any success and I would like to ask you for help
The situation is: I received from a WordPress API a json with a couple of posts, and I put the post content in the template like this:
Everything good until here. BUT my problem is: i’m making a replace in the json like:
this.data[x].content.rendered.replace(/<img/gi, "<img [image-with-zoom] ")
in order to add an attribute that I want to use with a directive. The replace is working fine, but the problem is that the innetHTML didn’t recognize that directive. What can I do to make that work???
The idea I want to reach is use that directive to catch a tap over an image, read it’s source and show the image inside a modal.
Thanks in advance!