Created
January 24, 2015 12:35
-
-
Save albertmatyi/2ee66bd646cff16a8722 to your computer and use it in GitHub Desktop.
meteor-munich-iron-router-template
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
<template name="booksTemplate"> | |
<div class=".books"> | |
{{#each books}} | |
{{title}} | |
{{/each}} | |
</div> | |
</template> |
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
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