Reputation: 5251
I am trying to display, literally, angle brackets in Vue. Let's say I want to display on my page, The text "<Hello>"
. I don't want Vue to render the HTML.
What is the Vue way to do display <hello>
on page?
I've tried, unsuccessfully:
<span v-pre>{{ <hello> }}</span>
adding it directly, surrounded by {{}}
{{ <hello>}}
Adding it directly
<hello>
Upvotes: 0
Views: 1282
Reputation: 3614
I see you went with the suggestion of using >hello<
. Which is fine, I just wanted to share another method in case someone else stumbles upon this question.
<template>
<div>{{ hello }}</div>
</template>
<script>
export default {
data() {
return {
hello: "<hello>"
};
},
};
</script>
Upvotes: 1