option change img src #1830
-
Hello ! I am trying to implement a country code select field with some customization. I need to use country flag icons with using fetched data's country abbr. code. I am able to change the img src based upon selected country's abbr. code with cumputed function using selected model but i also need to add flag icon of the relevant ountry on the select menu. I am kind of new to Vue. So if anyone can help me it would be great. Have a nice day !
|
Beta Was this translation helpful? Give feedback.
Answered by
Can-Kar
Apr 23, 2024
Replies: 1 comment
-
Solved my problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Can-Kar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
<img class="rounded-circle" v-bind:src=" 'media/flags_alt/' + country.country_abbreviation.toLowerCase() + '.svg' "/>
Solved my problem.