Hi there,
I’m trying to display users in a list, especially their email address.
The _id is perfectly displayed. But i actually can’t display their e-mail address.
Here’s the HTML :
<template name="usersTreeView">
<div class="col-12 align-self-end">
<table class="table table-striped">
<thead>
<tr>
<th scope="col"># Record ID</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
{{#each users}}
<tr>
<th scope="row">{{@index}}</th>
<td>{{_id}}</td>
<td>{{email}}</td>
<td>@twitter</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</template>
And here’s the JS helper :
Template.usersTreeView.helpers({
users: () => {
return Meteor.users.find({});
},
email: () => {
return this.emails[0].address;
}
});
I followed this topic : Meteor novice-- display list of user emails ,
but i wasn’t able to display the e-mail …
Here’s my result :
Thanks a lot !
B.