[Vuejs]-Can I keep Vuejs event in HTML data?

0👍

I don’t think you need to replace the whole HTML.
Just make a model like :

data() {
  return {
    text: ''
  }
}

And then in mounted state or else depends on your situation:

mounted() {
  let vm = this;
  vm.text = 'test123';
}

In your HTML use this:

<template><div id="id_1" v-on:click="method(value)">{{text}}</div></template>

Hope it will helps you 🙂

Leave a comment