Skip to content

Instantly share code, notes, and snippets.

@albertmatyi
Created January 24, 2015 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertmatyi/2ee66bd646cff16a8722 to your computer and use it in GitHub Desktop.
Save albertmatyi/2ee66bd646cff16a8722 to your computer and use it in GitHub Desktop.
meteor-munich-iron-router-template
<template name="booksTemplate">
<div class=".books">
{{#each books}}
{{title}}
{{/each}}
</div>
</template>
Router.map(function() {
this.route('books', {
path: 'favorite-books-url/:userId',
template: 'booksTemplate',
data: function() {
var niceBookArray = Books.find(
{
nice: true,
readBy: this.params.userId
});
return {
books: niceBookArray
};
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment