I've configured a page structure similar to the following:
<main id="app">
<div id="mount-place"></div>
</main>
<script type="text/x-template" id="my-template">
...some code here...
<input type="text" v-model="address">
...some other code here...
</script>
<script>
var ExtendedElement = Vue.Extend({
template: '#my-template',
data: function() {
return {
address: {{ some_address|safe }}; // retrieves values from django
}
},
mounted: function() {
console.log(this.address); // displays correctly
}
});
new ExtendedElement().$mount('#mount-place');
</script>
...some irrelevant logic here...
<script>
const app = new Vue({
delimiters: ['[[', ']]'],
el: '#app'
});
</script>
Everything renders properly, but there seems to be an issue with the v-model
as the input field is not displaying anything. However, when checking via the console, the values are present within the Vue object. No error messages are being shown.