get var from child vue

Solutions on MaxInterview for get var from child vue by the best coders in the world

showing results for - "get var from child vue"
Laura
02 Sep 2020
1add an event to your child call in the parent template like that
2
3		event is the name of the event
4<component @event="action"/> the action could be a function call or var interaction
5
6and then in your child you must create an event
7In the child ->
8<script>
9  export default {
10  	mehtods: {
11  		EventCreate() {
12        	this.$emit('event'); event is the name of the event
13        }
14    }
15  }
16</script>
17
18Now the @event in parent will execute at the call of EventCreate in the child
19template
20
21See more about this.$emit to know how to send vars
similar questions
queries leading to this page
get var from child vue