1
I need to call a v-on:click event with a dynamic argument.
I tried in the most logical way:
v-on:click="my_method({{value}})"
.
Doesn’t work.
1
I need to call a v-on:click event with a dynamic argument.
I tried in the most logical way:
v-on:click="my_method({{value}})"
.
Doesn’t work.
1
Just do it like this:
v-on:click="my_method(value)"
You do not need to use interpolation within dynamic HTML attributes. In Vuejs 2 any interpolation attempt on attributes generates an error message.
Browser other questions tagged vue.js
You are not signed in. Login or sign up in order to post.