Hi, first of all, thanks for this library !
I'm trying to figure out the way you can pass external functions or data into the vue script.
Why in the following code the toto value is accessible in the data function but not in the trigger method ?
[...]
<script>
let toto = 42;
let bar = function() {
console.log("bar function called");
}
export default {
data() {
return {
val: toto // (42)
}
},
methods: {
trigger() {
bar(); // (Uncaught ReferenceError: bar is not defined)
console.log(toto); // (Uncaught ReferenceError: toto is not defined)
}
}
}
</script>
[...]
PS: I'm a javascript newbie, so sorry if the answer is obvious.