I created a Vue project by Vue-Cli for study. It works well when all the data are stored in Components. But my question is why the data in Root Vue instance can't be rendered on root app instance. It's also the same question when I use webpack + vue-loader.
main.js
import Vue from 'vue'
//import App from './App.vue'
Vue.config.productionTip = false
new Vue({
el: "#app",
data() {
return {
msg: "Hello from Vue!"
}
}
}).$mount('#app');
msg can't show at page index.html
<div id="app">
{{msg}}
</div>