Skip to content

Instantly share code, notes, and snippets.

@brlafreniere
Last active August 29, 2015 14:18
Show Gist options
  • Save brlafreniere/23b94c2b2dd67b94f513 to your computer and use it in GitHub Desktop.
Save brlafreniere/23b94c2b2dd67b94f513 to your computer and use it in GitHub Desktop.
The {{#each}} block doesn't appear to be rendering. The modal does display, I can see the modal, and inspecting it in the Chrome inspector I can see the HTML, just nothing in between the <table> elements.
<template name="roomsList">
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Rooms List</h4>
</div>
<div class="modal-body">
<table>
{{#each rooms}}
<tr>
<td>{{name}}</td>
<td><button name="{{name}}">Join</button></td>
</tr>
{{/each}}
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</template>
Template.body.helpers({
rooms: function () {
return Rooms.find({});
}
});
// I tested in my client js console: Rooms.find({});
// and I am receiving documents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment