M
M
Mesuti2019-12-21 22:03:00
Vue.js
Mesuti, 2019-12-21 22:03:00

Why doesn't simple v-on:click work?

Hey!
Why doesn't the standard v-on:click work ?
You have to add crutches from JS. This is how it works:

So why doesn't it work? :

p.s. Pushed the button inside the vue instance, still doesn't work

jsfiddle


Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2019-12-21
@Mesuti

Well, firstly, you need to put the button in the template too, so that Vue knows about it.
And secondly v-on:click="seen = !seen"
https://www.youtube.com/watch?v=037TFFtE-qo

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question