2

Is it possible to use directive preventing vue from render the template?

For example

<div v-prevent-render>{{ variable }}</div>

will show {{ variable }}, but not the value of variable

---update---

Actually, I was prepared to do some operations before render, not just to show the original text... When things done, I will use $mount or render.

So maybe what I need is kind of a render interceptor...

GuessEver
  • 71
  • 1
  • 4

1 Answers1

4

You can use v-pre for that:

<div v-pre>{{ variable }}</div>

Here's the JSFiddle: https://jsfiddle.net/craig_h_411/5bnv7v28/

tony19
  • 125,647
  • 18
  • 229
  • 307
craig_h
  • 31,871
  • 6
  • 59
  • 68