I want to create new html element with v-on
call. However after I call function pasted below the v-on is not rendered so nothing happens after click. Is there anyway I can force vue to re-render this element?
createFromTemplate: function() {
var el = document.body.appendChild(document.createElement('div'));
el.innerHTML = '<a href="#" v-on="click: close()"></a>;
},
The same thing that you do to populate the element:
can be done to assign a function: