0
I’m new to Vue and I need to maintain a project.. the problem is this: I have in main.js the route scheme..
main.js
import Vue from 'vue'
const app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
}
});
page.
<span>{{ message }}</span>
I happen to be trying to display the "message" that is on date in an external template.. that is in the folder address ".. /pages/page.Vue"; more when I put {{ message }} returns me the following error:
[Vue warn]: Property or method "message" is not defined on the instance but referenced During render. Make sure to declare reactive data properties in the data option.
Thank you!
It makes no sense for you to define properties in main.js, data transfer is done through the Vue components, in main you should render your core component and manage the library
– Felipe Duarte
Here’s a good example of methods to transfer data between components https://codesandbox.io/s/mm58vw8px8
– Felipe Duarte
Blz I’ll read here valeu man!
– wDrik