I am fairly new to VueJS. There is a parent component, from which, data is passed to child and grandchild.
My Child component looks like this,
B.vue
import C from './c.vue'
export default{
props:['info'],
components:{
'c': C
},
created: function(){
this.getInfo();
},
methods: {
getInfo: function(){
console.log("Printing inside get method", this.info);
}
}
}
<template>
<div>
<c :info="info"></c>
</div>
</template>
When I see the console, I see an array printed like this,
When i try to access the elements of the array like this, info[0], the console shows undefined. I am unable to access the elements of the array. Can someone please help me out here? Thanks!