Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Jade seems not to handle if statement with Template.subscriptionsReady helper #154

Open
alexofob opened this issue Jun 18, 2015 · 3 comments
Labels

Comments

@alexofob
Copy link

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!

@mquandalle
Copy link
Owner

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

@alexofob
Copy link
Author

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.

@sangyoo91
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants