[Answered ]-Unable to run Vue.js 3 along with django code

1👍

The app is trying to mount to a div with id todaysappts which doesn’t exist. Add the id to the root element:

console.log(`Vue code inserted`);
const app = Vue.createApp({
delimiters: ["[[", "]]"],
data() {
    return {
    message: "Hello Vue!",
    };
},
computed: {},
methods: {},
});
app.mount("#todaysappts");
<div id="todaysappts" class="row">
    <div class="col-md-24">
    Here: [[ message ]]
    </div>
</div>

<script src="https://unpkg.com/vue@next"></script>

After the post edit: Also, the HTML is invalid because there are <div> elements inserted directly into the table template.

👤Dan

Leave a comment