The problem is like this. There is an API that generates PDFs from using HTML to PDF mechanism. The API returns the nicely generated PDFs to an angular app. So far so good. Now there is a new requirement that pieces from these PDFs should be embedded into some Angular components. I get these pieces from the API as strings and now I must find a way to make them run. The problem is that some have JavaScript in them and this code is not executed by the Angular when I bind them to the components. Any advice or workaround is welcome. I have created an example with such code for a easy testing and understanding of the problem.
https://stackblitz.com/edit/angular-ksytg4
from How to execute/evaluate dynamic mixt of html and JavaScript code and the result to embed it into the angular component?
No comments:
Post a Comment