F
F
Faiq Alizade2018-06-18 22:53:06
Vue.js
Faiq Alizade, 2018-06-18 22:53:06

How to pass variable from parent to child in vue?

Hello here is the code

new Vue({
el:'#app',
data:{
msg: 'Text'
},
components:{
'component':{
data:function(){
return{
show:true
}
},
template: `<p>{{msg}}</p>`
}
}
});

I want to display in the component from the first data msg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Stolyarov, 2018-06-18
@faiq

props

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question