0👍
You are mixing jQuery
with Vue and both are conceptually different. Here jQuery is entirely unnecessary because you can use Vues built in click event:
// This will call remove series on click and remove the element by the given id
<a href="#" @click="removeSeries(series.id)">X</a>
Now, this will call your removeSeries
for the given id
and you can update the underlying model data however you want.
Here’s the JSFiddle:
https://jsfiddle.net/vyra5nzc/
Just a note on delimiters, Vue also accepts @{{data}}
as a delimiter if you are using the double mustache in some other templating engine such as laravels blade.
- [Vuejs]-The component template do not shows up, it render to the `<!—->`
- [Vuejs]-How to redirect back after logout, unless page needs authentication?
Source:stackexchange.com