Last active
January 5, 2016 02:44
-
-
Save n370/e289d9265714e5978e2a to your computer and use it in GitHub Desktop.
Issue with FlowRouter
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
FlowRouter.route('/product/:id', { | |
name: 'product', | |
action(params) { | |
let product = Products.findOne({_id: new Mongo.ObjectID(params.id)}); | |
/** | |
* Will return undefined after a browser refresh, although | |
* sometimes it seems to work fine. However, if activated | |
* by FlowRouter.go('product', {id: "a valid id string"}) | |
* will return a collection document as expected | |
*/ | |
console.log(product); | |
BlazeLayout.render("mainLayout", {main: "product"}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment