meteor-jade
meteor-jade copied to clipboard
Jade seems not to handle if statement with Template.subscriptionsReady helper
Hi There,
I just got tripped by jade and I still haven't recovered. Having spent so much time to debug what the issue was, I found jade was the culprit.
Below is just an illustration of my code:
template(name="form") if Template.subscriptionsReady p Hehehe
else
p Loading
For some reason eventhough subscriptions are ready I keep seeing Loading. When I convert to html/spacebars, it works fine.
I suspect that jade is not interpreting Template.subscriptionsReady correctly or it is not able to handle it.
Help!
I answered you question on the meteor forum because I've seen it there first, but I guess it's more appropriate to continue the discussion here if my answer doesn't help.
https://forums.meteor.com/t/thoughts-on-using-jade-with-meteor/4810/14
Yeah, you may be right. It could be my formatting, but I have tried the different approaches with | or p and still none works for me.
It may just be that I am not proficient with Jade enough since I am a bit new to it. I would appreciate if someone could also test this scenario with a real example aside the test case scenario.
Thanks.
I too have come across the same question. if Template.subscriptionsReady
doesn't do anything for me.
EDIT: It acts as if subscription is always ready, but in the console, I am waiting for sub