Hi, i’m trying to call API from my localhost [ Using PHP & Mysql ] but i don’t know the correct way
i already do some code and it’s show me the json on my consol.log but when i try to loop it in my template i can’t
This is my code
<template>
<div class="page">
<ul>
${items.map((item) => $h`
<li key=${item.id}>${item.id} - ${item.code}</li>
`)}
</ul>
</div>
</template>
<script>
export default () => {
let ApplicationData = app.request.json('https://localhost/recycle/api/v1/all-collection-orders').then((res) => {
return res.data;
});
const items = [ApplicationData];
console.log(items);
return $render;
}
</script>