Good day everyone, hope you’re doing well. Just wondering as I’m going through Vue.js tutorials online and is this even possible? I want to call method1 in Component2 from the button click in Component1. How would I access that method in another file? Thanks so much for any tips and help, much appreciated.
Component1.vue
<template>
<div>
<button @click="method1"/>Ask me</button>
</div>
</template>
Component2.vue
function method1() {
console.log('method1 called')
}