Skip to content Skip to sidebar Skip to footer

Vue.js Parent <-> Child Updating Value, Routing View

I'm having issue regarding updating parent prop in child view. In my case Contestant is parent, EditContestant should be child. Contestant.vue should store (yeah, probably answer i

Solution 1:

You don't need this. in template, just use $parent. Template is already in the this. scope.

The communication between parent and child should be using Props down events up, instead of directly call the function thru this.$parent.function(). You should $emit('callFunc') then @callFunc="function".

Solution 2:

removing this from this.$parent... in EditContestatn.vue file helped. Thank you for your help @CloudSohJunFu. If you wish to answer to my question I will gladly accept your answer and delete my own.

Post a Comment for "Vue.js Parent <-> Child Updating Value, Routing View"