Problem to transfer data from Django template to vue.js app

Viewed 106

I am trying to make Django and Vue talk. I installed Vue-Cli with Vue3. Vue app is well displayed into the Django template, but I can't transfer data (Django data but also a simple string for testing) to the vue app.

App.vue

<template>
    <h1>{{ msg }} world</h1>
</template>

<script>
export default {
    name: 'App',
    props: {
        msg: {
            type: String,
            default: 'test'
        }
    }
}
</script>

<style scoped>

</style>

main.js

import { createApp } from 'vue'
import App from './App.vue'

createApp(App).mount('#app')

This code shows "test world", instead of "Hello world".

Thank you in advance for your help.

0 Answers
Related