Hi I'm supposed to make a website for school using vue,
I've included vue in the head of the html using:
<script src="https://unpkg.com/vue"></script>
When I try to create a new vue (as a script in html and as a .js file):
var vuetop = new vue({
el: '#vuetop',
data: {
dat: null
},
created: function() {
fetch("/data/topnews.json")
.then(r => r.json())
.then(tdat => {
this.dat = tdat;
})
}
})
I always get the error "Uncaught ReferenceError: vue is not defined"