FrontendDeveloper.in

Vue.js question detail

What is the purpose of comments option?

When comments option enabled, it will preserve and render HTML comments found in templates. By default, it's value is false. Let's see the action in an example,

<template>
<!--greeting-->
<h1>{{ msg }}</h1>
</template>

<script>
export default {
comments: true,
data () {
return {
msg: 'Good morning'
}
}
}
</script>

Note: This option is only available in the full build, with in-browser compilation. i.e, It won't work with Single File Components(SFC).

Back to all Vue.js questions
Get LinkedIn Premium at Rs 399