Hi there
I’m actually working on an app on which i want to display all the users of this application (I’m working on an admin control panel).
Actually, i’m getting informations from mongo, perhaps it only show me the current user information … But i want all the users !
Here is my code :
userMain.js
Template.usersTreeView.helpers({
usersTreeList: () => {
return Meteor.users.find({});
}
});
userHome.html
{{#each usersTreeList}}
<tr>
<td>{{_id}}</td>
</tr>
{{/each}}
It works (i did the publish and subscribe part too of course ). But it show me only one user ID when i presntly have 2 in mongoDB…
What do i missed ?
Moreover : I tried to display email info of this user by doing :
{{#each usersTreeList}}
<tr>
<td>{{emails[0].address}}</td>
</tr>
{{/each}}
Nothing comes … What should i do here too ?
Thanks a lot
Brawcks