vuejs / Discussion

Vue.js discussion
167 stars 17 forks source link

Instantiate a copy of a component directly in that component #1313

Open maitrungduc1410 opened 7 years ago

maitrungduc1410 commented 7 years ago

Hey guys, Can we do this in Vue: in MenuItem.vue file, I write this:

 ...<MenuItem></MenuItem>...

It's a little bit difficult to explain :) . What I want to do is create MenuItem right directly in MenuItem.vue (sounds like recursion), I try but it doesn't work . Can anyone help me? Many Thanks!

vrajau commented 6 years ago

https://vuejs.org/v2/guide/components.html#Recursive-Components