Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Tyler-Anderson
Created July 11, 2015 20:29
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 Tyler-Anderson/54a274ab827ee38cdb19 to your computer and use it in GitHub Desktop.
Save Tyler-Anderson/54a274ab827ee38cdb19 to your computer and use it in GitHub Desktop.
<template name="inDeck">
<div >
<ul>
{{#each cards}}
{{card}}
{{/each}}
</ul>
</div>
</template>
<template name="deckBuilderMain">
{{> Template.dynamic template="deckBuilder"}}
</template>
<template name="deckBuilder">
{{> inDeck cards=current }}
</template>
Template.deckBuilder.helpers({
tagSelect: function(tag){
return Cards.find({
tags: tag
});
},
current: function(){
let id = FlowRouter.getParam("id");
console.log(id);
return Cards.find({
decks: id
});
}
});
[quote="xero, post:6, topic:6797, full:true"]
<template name="inDeck">
<div >
<ul>
{{#each cards}}
{{card}}
{{/each}}
</ul>
</div>
</template>
<template name="deckBuilderMain">
{{> Template.dynamic template="deckBuilder"}}
</template>
<template name="deckBuilder">
{{> inDeck cards=current }}
</template>
Template.deckBuilder.helpers({
tagSelect: function(tag){
return Cards.find({
tags: tag
});
},
current: function(){
let id = FlowRouter.getParam("id");
console.log(id);
return Cards.find({
decks: id
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment