I am updating my Framework7 v5 App to v7. I used template7 previously and now trying to use a template literal.
The code I am trying (simplified) is:
let antibiotics = [];
$f7.request.json('https://antibiotics.vetcalculators.workers.dev')
.then(function (res) {
antibiotics = res.data
console.log(res.data);
}, function (error){
console.log(error)
});
with the template literal as:
<ul>
${antibiotics.map((antibiotic) => $h`
<li>${antibiotic.name}</li>
)};
</ul>
The data shows in the console.log but the template is not rendered. I’m sure it’s a newbie mistake, but any help would be appreciated.