Answers for "get var from child vue"

0

get var from child vue

add an event to your child call in the parent template like that

		event is the name of the event
<component @event="action"/> the action could be a function call or var interaction

and then in your child you must create an event
In the child ->
<script>
  export default {
  	mehtods: {
  		EventCreate() {
        	this.$emit('event'); event is the name of the event
        }
    }
  }
</script>

Now the @event in parent will execute at the call of EventCreate in the child
template

See more about this.$emit to know how to send vars
Posted by: Guest on August-13-2021

Code answers related to "get var from child vue"

Browse Popular Code Answers by Language