I have a problem with publishing with iron router.
It acts as if can't access the value from the variable
If i try to replace
Meteor.subscribe('singleMatch', id);
with
Meteor.subscribe('singleMatch', 463358926);
it works
here is my code https://gist.github.com/anonymous/8810102
Note: i created a separate variable for this.params, because i couldn't access the attributes
There may be two issues here:
I think Meteor.subscribe('singleMatch', id)
should be Meteor.subscribe('singleMatch', id).wait()
so that your subscription is in fact ready before you move on. This may be the culprit you're looking for.
Second, I believe Meteor.call()
is async, therefore your route can actually execute whether or not you receive an error in your callback.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.