Nested Child Component

by ChangJoo Park

HTML

<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>

<div id="app">
  <child-component></child-component>
</div>

JavaScript

var NestedChildComponent = {
	template: '<div>Hello I am grand child</div>'
}

var ChildComponent = {
  template: '<div>Hello I am child <nested-child-component></nested-child-component></div>',
  components: {
		'nested-child-component':  NestedChildComponent
  }
}


var app = new Vue({
	el: '#app',
  components: {
  	'child-component': ChildComponent
	}
})