Having trouble calling a method from CoinList.vue
in my two components, App.Vue
. Here's the code snippet:
Snippet from App.vue
<q-list>
<q-item clickable v-close-popup @click="cct">
<q-item-section avatar>
₦
</q-item-section>
<q-item-section>NAIRA</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="changeToUsd()">
<q-item-section avatar>
$
</q-item-section>
<q-item-section>USD</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="changeToEur()">
<q-item-section avatar>
€
</q-item-section>
<q-item-section>EUR</q-item-section>
</q-item>
</q-list>
Snippet from CoinList.vue
methods: {
getCoinsData: function () {
...
},
changeToNgn: function () {
...
},
changeToUsd: function () {
...
},
changeToEur: function () {
...
},
},
The click event in App.vue
is not triggering the function in CoinList.vue
. I've tried using an event bus but couldn't figure it out. Any help would be greatly appreciated.