D
D
Dimka52019-04-15 20:20:54
Vue.js
Dimka5, 2019-04-15 20:20:54

Is it possible using Vue to not display curly braces (Mustache syntax) on page load/initialization?

// Вид HTML-элемента при загрузке
 _______________________
|                       |
| {{ объект.параметр }} |
|_______________________|

// Хотелось бы вот так
 _______________________
|                       |
|                       |
|_______________________|

The directive v-modeldoes not work for all elements, for example, it does not work for <div>. What are the options without using server-side rendering and crutches like элемент.innerHTML = this.параметр?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Proskurin, 2019-04-15
@Dimka5

Use this v-cloak directive for your application block. vue will remove it after initialization, which means that you can write css that will hide the block with this attribute.

div[v-cloak] {
    display: none;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question