Created
January 3, 2015 22:11
-
-
Save fesja/d08b4df2188a15a77742 to your computer and use it in GitHub Desktop.
error in meteor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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