I'm brand new to Vue.js and trying to create an image who's src file path contains a variable. I am having a hard time concatenating in Vue.js.
I have an image like this:
<img :src="'https://openweathermap.org/img/w/04d.png'"/>
I want to concatenate the '04d.png' part so that it is dynamic and shows whatever image coming back from the API call. How do I add a variable onto the url?
I've tried this:
<img :src="'https://openweathermap.org/img/w/+${iconCode}'"/>
I've tried a bunch of different combinations of single quotes, double quotes, backticks, etc... and nothing works. What is the proper way to concatenate a variable onto a string url in an image tag in Vue?