R
R
Romi2021-12-08 17:23:48
Vue.js
Romi, 2021-12-08 17:23:48

How to understand such a construction in Element UI :key="`country-${item.id}`"?

Here is the context:

<el-option
                        v-for="item in countries"
                        :key="`country-${item.id}`"


from the context, in general, it is clear that keys of the 'country-15' type will be generated,

but the rules by which all this is written are not clear, how is this syntax generally regulated?

these strange quotes: `quotes` - is it from JavaScript or where?

this is ${item.id} - an expression - the meaning is clear what it is, but how does it combine with quotes `` and why is there a dollar sign?

Explain please who understands?

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Komarov, 2021-12-08
@romicohen

RTFM

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question