Skip to content

Instantly share code, notes, and snippets.

@fesja
Created January 3, 2015 22:11
Show Gist options
  • Save fesja/d08b4df2188a15a77742 to your computer and use it in GitHub Desktop.
Save fesja/d08b4df2188a15a77742 to your computer and use it in GitHub Desktop.
error in meteor
// client/templates/event-list.html
<template name="eventList">
<table>
<tbody>
<tr>
<td>Nombre</td>
<td>Categoría</td>
<td>Fechas</td>
<td></td>
</tr>
</tbody>
{{#each events }}
{{> eventListItem }}
{{/each}}
</table>
</template>
//client/templates/event-list.js
Template.eventList.helpers({
events: function () {
var filters = {};
...
return Events.find(filters, {sort: {datetime: 1}});
}
});
// lib/router.js
Router.configure({
layoutTemplate: 'appBody',
waitOn: function() {
return [
Meteor.subscribe('events')
];
}
});
// server/publish.js
Meteor.publish("events", function () {
return Events.find();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment