0👍
✅
try to pass that json
variable as props
or define it before export default{ ...
in the main.js
send that json to child component as follow :
...
template: '<app :json="json"/>'
...
in the child component receive it like:
export default {
props:["json"],
name: 'app',
data () {
return {
test: this.json
}
}
}
Source:stackexchange.com