I have one FormViewin Django and I want to display this form in Modal. Therefore, I create a Vue component and create it as follows:
created: function(){
let self = this;
$.get(window.profileUrls.registration, function (data){
$('#registerModal').replaceWith(data);
self.$forceUpdate();
});
}
Django returns the HTML with the form and replaces the default empty modal with this HTML. But a forced update does not reinitialize v-model, and other bindings and vue do not update component data.
Is there any way to manually reinitialize a component after a GET request?
source
share