0👍
You can do this by having the attribute v-on:click="filterSelection(genre)"
on your button.
Edit: Forgot quotes.
- [Vuejs]-Create VUE component after page loaded
- [Vuejs]-Nginx: try_files's last value does not work when root is variable
0👍
Since vue uses a virtual dom, you cannot use the "native html" events.
Instead you define click events via an event handler [docs]
<div id="example-1">
<button v-on:click="counter += 1">
Add 1
</button>
<p>
The button above has been clicked {{ counter }} times.
</p>
</div>
alternatively you can use the shorthand for v-on
and use the @
symbol like @click=
Source:stackexchange.com