[Vuejs]-Nothing can go in between custom tags – <myTag_vue> … </> in vue js?

2πŸ‘

βœ…

What your trying to do is comparable to AngularJS transclusion mechanism. You need to actually tell vuejs where the content will be inserted in the template by using a <slot></slot> element:

<template>
  <h1>rrrrr</h1> // this is visible
  <slot></slot>  // this is where "<h1> visible? or not? </h1>" would be inserted
</template>

You can find more about this in vuejs component guide or the dedicated Slot documentation page.

πŸ‘€Pierre-Adrien

Leave a comment