I want to access an object of a component, but this
in methods is references to the methods: {}
object.
methods: {
getInput: () => {
return this.$refs.input.value
}
}
I tried to invoke getInput()
, but I am getting an error:
Uncaught TypeError: Cannot read property '$refs' of undefined.
How can I access an object of a component instead of a methods
object?