Using single file components, how can I change a data property from a directive?
So for example, I've got...
export default {
name: 'app',
data: function() {
return {
is_loading: true
}
},
directives: {
do_something: {
bind: function(el, binding, vnode) {
// Change the is_loading property
}
}
}
}
At first I thought I could do this.is_loading = false
but this
is undefined
.