I’m working on a small project with some collections. Almost since the begining I’ve been having the same problem. The problem relates to the loading and wait on the subscriptions. I’m using iron router and in the waitOn im putting the subscriptions that i need for that controler. Everything works fine… after 5 minutes it breaks some part of the code, because it returns null on a stupid find on a collection.
I spend the last 2 days reading blog post, tuts, all the stuff that I could find, but my problem is still there.
One simple example:
In iron:router if i use method
waitOn it works for a while… and then it starts breaking while finding a collection. Then i change it to use method
subscriptions… hurray… it works… after a while it starts breaking again… and i go back to waitOn again… bahhhh
my question is: What are we suposed to do to actually wait for a collection to load or to do what it needs to do? What are you guys that already create 200 meteor apps are doing to overcome this problem?
PS: sry for my english