vento: for loop using a function throws error
index.vto:
{{ for await member in getMembers() }}
<p>{{ member.followers_url.length }}</p>
{{ /for }}
xodium.index.ts:
export function getMembers(): Promise<unknown[]> {
return GithubService.getData("members");
}
<script type="module" src="assets/modules/xodium.index.js"></script>
is how i import it. i thought first it was because the script got imported at the end of the file but moving it up doesnt work either. i have no clue what iam doing wrong, this is the error message: Caused by: Error: Invalid for loop: for await member in getMembers()
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (15 by maintainers)
@oscarotero yes it works!