I cannot for the life of me figure this out. I have what seems like a super simple block of code, instantiating a new Vue object hooked to a div with id providers.
const app = new Vue({
el: '#providers',
data: {
providers: []
},
created: () => {
console.log(this);
},
})
For some reason, when I call console.log(this)
in created, it's returning "Window {window: Window, self: Window, document: document, name: "", location: Location, …}"
I'm running Vue 2.6.12
. Can anyone help me resolve this issue?
I can't access any of my data in my lifecycle commands because of this.