[Vuejs]-Problem with my counter increment on addeventlistener

0👍

Solution to your problem is to use arrow function instead of a anonymous function when you add the event listener, since the anonymous function have a separate context from the function they are used in, so they do not have the vue instance attributes, arrow dunctions solve this issue.

So, use this:

td3.addEventListener(‘click’, () => {

Leave a comment