[Vuejs]-Call method which returns an array in v-for and iterate through it in vue.js

0๐Ÿ‘

{{ const programs = await speaker.getPrograms() }}
This should not be on your template.

I would try a lifecycle method like :

async init() {
    this.allSpeakers = await getSpeakers()
    this.programs = this.allSpeakers.map(speaker => speaker.getPrograms())

}

In your template you should have a v-if="programs" for your programs and also for your allSpeakers in order to wait fetching the data and then render

Leave a comment