S
S
skriplenok2018-09-23 15:18:15
Vue.js
skriplenok, 2018-09-23 15:18:15

Vue.js recognize html tags in text?

Tell me, how to create text with html tags in data for subsequent dynamic binding?
For example data () {
return {
test: "test <br> test";
}
In this case, it will be recognized as text
. Everything turned out to be simple: using v-html

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Klein Maximus, 2018-09-27
@kleinmaximus

Could it be ?
And, in general, it is better to write why you need it.
I guess there are better ways to solve the problem.

S
skriplenok, 2018-09-29
@skriplenok

Corrected the question a little: the problem is that there is a string array with html tags, for example "test <br> test", with dynamic insertion, tags are also recognized as text (((

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question