'Angular 13, I can't use interpolation to play youtube video

I'm trying to use interpolation to play a youtube video, it's not working. The project object's video field is a string holding https://www.youtube.com/embed/nwNQexRDAf0 but for some reason it just appears as nothing. However, when I replace the {{product.video}} with "https://www.youtube.com/embed/nwNQexRDAf0", then the code runs like how I want it to.

<iframe width="560" height="315" src={{product.video}} title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

How do I fix this, and why does this happen?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source