-
-
Save Tyler-Anderson/54a274ab827ee38cdb19 to your computer and use it in GitHub Desktop.
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="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