Interpolation

Follow along with this video on CodePenopen in new window

Interpolationopen in new window with the "Mustache" syntax is the most basic form of data binding in Vue. Any data variable placed between the mustache tag will be replace with it's value.

<div id="app">
  <div>{{ message }}</div>
</div>

The v-onceopen in new window directive will prevent the interpolation from being rendered more than once.

<div id="app">
  <div v-once>{{ message }}</div>
</div>

By default, the data inside a mustache tag will be interpreted as plain text. So, in order to output real HTML, you will need to use the v-htmlopen in new window directive instead.

<div id="app">
  <div v-html="message"></div>
</div>