I wanted to receive an HTML data via service call to server(this is for sure. I cannot keep templates in local) and manipulate them internally on how to show it(either as a
Check this package one https://www.npmjs.com/package/@codehint-ng/html-compiler Or see the source code to see how to compile the HTML string with paired JS object with data and events.