I have been trying to learn Vue and can't get props working correctly. Props I pass in continue to be undefined and I can't seem to figure out why
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js"></script>
<title>Document</title>
</head>
<body>
<div amount = "5" id="app" @click="console.log('clicked')">
<p>{{amount}}</p>
<span >{{message}}</span>
</div>
<script>
var test = new Vue({
el: '#app',
props: ['amount'],
data: {
message: 'Hello World',
},
created: function() {
console.log(this.amount)
},
});
</script>
</body>
</html>
This is the code I was trying to work with previously to isolate the issue to figure out why the props are coming through as undefined, but it still isn't working. Can someone help me figure out how you are supposed to do this?