Closed mathieutozer closed 10 years ago
It IS possible, but I haven't written a nice API for it yet.
If you look at gh-release-watch, I wait on the subscription object for the unsubscribe page: https://github.com/mystor/gh-release-watch/blob/master/routes.js#L44
Basically, by calling the subscription, and then immediately asking if it is ready, you can tell whether it is ready yet, and then instead of loading a normal page, load a loading page.
At some point, I will probably add a syntax for waitOn, but I haven't gotten there yet.
Thanks that works!
I think I'll mark this as closed for now, until I come up with a good mechanism to enable people to write this type of code.
The current system isn't that bad, it could use some extra documentation though.
In iron-router I would have done something like this to ensure my subscriptions are ready before rendering.
I've dug a bit into the documentation and the example code, and even the source, but don't see how to do this. Is this possible yet?