Answer the question
In order to leave comments, you need to log in
How to substitute a variable into the radio buttons option text?
options: [{
text: `'текст ${this.test}'`, value: 'below', // конструкция с обратными кавычками не работает
}, {
text: 'текст 2', value: 'between',
}, {
text: 'текст 3', value: 'above',
}],
Answer the question
In order to leave comments, you need to log in
`'текст ${this.test}'`
Why even single quotes? They are not needed.
options: [{
text: `текст ${this.test}`, value: 'below', // конструкция с обратными кавычками не работает
}, {
text: 'текст ' + this.anyTestParam, value: 'between',
}, {
text: 'текст 3', value: 'above',
}],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question