Image doesn't preview in alert

My alert doesn’t show image if i use variable in ts file. I use this code as message that it is like “http://www.example.com/image.jpg”;

message: '<img src="${my_image_path}">

But my image doesn’t show. But if i use image path like “http://www.example.com/image.jpg” without variable like below;

message: '<img src="http://www.example.com/image.jpg">

it shows the image.

And i see this path in console

http://localhost:8100/$%7Bmy_image_path%7D

but my image path comes like that;

http://www.example.com/image.jpg

I checked the image path and it’s correct. So what is the issue about that? anyone help?

I would suggest reading the Angular data binding documentation. Snake case is also not conventional for properties - what you want would more customarily be written as follows:

<img [src]="myImagePath">