How to display Names and Emails in different lists?
<!DOCTYPE html>
<html lang="en">
<head>
<title>Loops</title>
</head>
<body>
<main id="app"></main>
<script src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script>
<script>
function App() {
let self = {
members: [{
name: "Albert",
email: "alberto@email.com",
age: 38
},
{
name: "Alberto",
email: "albert@email.com",
age: 26
},
{
name: "Sylvain",
email: "sylvain@email.com",
age: 57
}
]
};
let template = `<>
<h2>Loops</h2>
<div>
<h5>Names</h5>
<ul @loop="self.members">
<li> {{self.name}} </li>
</ul>
</div>
<hr />
<div>
<h5>Emails</h5>
<ul @loop="self.members">
<li> {{self.email}} </li>
</ul>
</div>
</>`;
return lemonade.element(template, self);
}
lemonade.render(App, document.querySelector('#app'));
</script>
</body>
</html>
Expected:
But:
How to get the expected result?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
United States - Loop
Walmart launches Loop reusable packaging range online, delivered straight to your home with W+ InHome. Learn More. available instore.
Read more >Loop Earplugs: Your life, your volume
Choose how you hear the world with Loop. Backed by years of continuous R&D, our certified hearing protection is the perfect balance between...
Read more >Loop Returns: Ecommerce Returns Management for Shopify ...
Loop helps Shopify's best brands optimize return costs, retain more revenue, and prevent return losses.
Read more >Loop Definition & Meaning - Merriam-Webster
verb ; 1. a. : to make a loop in, on, or about. b. : to fasten with a loop ; 2. :...
Read more >Loop TV: Free TV & Digital Signage for Businesses
Loop is a free music video, business TV and digital signage service, fully licensed to run in businesses. Grab your free Loop TV...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We are creating a alternative for that… it should be released soon
Yeah. but, why do we really need to build different arrays as we can’t create and call multiple APIs for this approach or after getting from one API then creating multiple arrays for a large set, it doesn’t seem to be right or scalable.