Use Angular4 functions like (click) [src] inside [innerHTML] of Angular4

Viewed 216

I'm using markdown-it compiler to convert markdown text in html which I'm displaying using innerHTML.but problem is that I want to add function to some particular div and use [src] to display sanitized url of youtube in iframe.

it showing me error that sanitizer has stripped some part of code and no javascript functionality is working inside [innerHTML].

I heard that $compiler was the solution in angularJS. is it still available for ANgular4 and yes than can anyone help me to implement it?

Can any one help me to solve this problem?

0 Answers
Related