[Vuejs]-Passing data through nested components in Vue.js

2👍

Okay this one was tricky.

Several problems with your code:
Your components should have only one root element. So pack your components into a <div>.

Then, - is not a valid character to put into a javascript variable name. So you can’t write (p-key, p-value) in parent, write something else, like (pKey, pValue) in parent.

On the other hand, html properties are not case-sensitive, so you should actually write key-name (for example) instead of keyName, but only for the property names. This limitation does apply only in your html files (not in your string templates).

Finally, here is a working js-fiddle.

https://jsfiddle.net/6juwLd3b/

Additionally, I would advise you that you look at your console while developing. Many error where displayed that could have lead you to a working version.

Leave a comment