GuessEver
GuessEver

Reputation: 71

is it possible to use directive intercepting vue from render the template

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...

Upvotes: 2

Views: 522

Answers (1)

craig_h
craig_h

Reputation: 32724

You can use v-pre for that:

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

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

Upvotes: 4

Related Questions