Hello,
In Elixir version 1.15, I want to call the attribute like this: <img src={youtube.id} class="theclass">
in html.heex file. However, it’s showing an error that the src
attribute should be enclosed with double quotes, but when I use double quotes, the variable is not being interpolated correctly. It should produce the output of the YouTube ID stored in the database, for example: <img src="IYEWBHSs" class="theclass">
.
In Elixir version 1.14, even without the double quotes, the variable interpolation works correctly. I’ve also tried using the #
symbol like this: <img src="#{youtube.id}" class="theclass">
, but it still fails.
Please help me understand what could be causing this issue and how to correctly interpolate the variable within the src
attribute in Elixir version 1.15.
Thank you.