In my Vue project, I am utilizing the CDN method but now require the router functionality. Fortunately, I came across a tutorial that provides a clear explanation on how to set up routing without the need for CLI & Webpack. Check it out here:
Following the tutorial, I have successfully implemented three routes in my application that update the view as expected. However, I'm facing an issue with adding and accessing data within the components. When trying to access the "message" data property in my Home component, the app stops working and throws an error stating that "message" is undefined.
var Home = {
template: `
<div>
<div>
{{message}}
</div>
</div>
`,
data: {
message: 'Hello'
}
};