How to comment code in a vue.js file?
As Bill Criswell said we can use HTML comment syntax.
<!-- Comment -->
But, It will work outside the template tag too, comment.vue
<!-- Testing comments, this will work too. -->
<template>
<!-- This will work too -->
<div>
<!-- Html Comments -->
Hello There!
</div>
</template>
<style><style>
<!-- Commenting here -->
<script>
// Commenting only 1 line
/**
* Commenting multiple lines
* Commenting multiple lines
*/
</script>
You'd want to use standard HTML comments in the <template>
tag in your situation. They'll be stripped from the output as well which is nice.
<!-- Comment -->