Answer the question
In order to leave comments, you need to log in
How to solve the problem with the visibility of data in an array in Vue JS?
Hello!
I started watching a course on Vue JS on Laracast and immediately fell into a syntax stupor.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue JS Learn</title>
</head>
<body>
<div id="root" >
<input type="text" id="input" v-model="message">
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.4.2/vue.min.js"></script>
<script type="text/javascript">
new Vue({
el: '#root',
date: {
message: "Hello World"
}
})
</script>
</body>
</html>
ReferenceError: message is not defined
Answer the question
In order to leave comments, you need to log in
What is date , change to data
date: {
message: "Hello World"
}
data: {
message: "Hello World"
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question