i'm working on a multipage website in vue and often need the same methods for different views. I read that you can do that with a shared .js file and it works if i have my "test method" downloadModel as a single function but as soon as i try to split it up, i get a TypeError: Cannot read properties of undefined (). How can i fix this? Sry i'm relatively new in this world. :)
export default {
methods:{
downloadModel(id) {
this.printMessage('Download',id)
},
printMessage(string,id){
console.log(string, id)
},
} }