diff options
Diffstat (limited to 'client/components/cards/router.js')
-rw-r--r-- | client/components/cards/router.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/client/components/cards/router.js b/client/components/cards/router.js new file mode 100644 index 00000000..48bb9a95 --- /dev/null +++ b/client/components/cards/router.js @@ -0,0 +1,15 @@ +Router.route('/boards/:boardId/:slug/:cardId', { + name: 'Card', + template: 'board', + waitOn: function() { + var params = this.params; + // XXX We probably shouldn't rely on Session + Session.set('currentBoard', params.boardId); + Session.set('currentCard', params.cardId); + + return BoardSubsManager.subscribe('board', params.boardId, params.slug); + }, + data: function() { + return Boards.findOne(this.params.boardId); + } +}); |