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 “”;

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

But my image doesn’t show. But if i use image path like “” without variable like below;

message: '<img src="">

it shows the image.

And i see this path in console


but my image path comes like that;

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">