[Vuejs]-So how can I update or re-render my html template on dynamically changed property using VueJS?

1👍

Did you try to use watcher ? like this one

watch: {
   predefined_title(val) {
      this.title = val
   }
}

Or, put a condition in your input to prevent showing it when predefined_title is empty.

<input type="text" class="form-control" v-model="title" v-if="predefined_title">

Or, destroy your component to remove it in the vue instance like this below

beforeDestroy () {
    this.$el.parentNode.removeChild(this.$el);
    $('.modal-backdrop').hide();
},

Leave a comment