[Vuejs]-How do I access object values in various elements to display event data?

0👍

First: you don’t properly include Vue. Include it inside <head>, and in jsfiddle include just a script url, without tags.

Second: your event binding syntax is wrong: you’re trying v-on="click: addEvent", but the proper syntax is v-on:click="addEvent($event)" – in this example you also pass $event to your method, and you an extract a value like this: $event.target.value.

Leave a comment