-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to manage route and data context? #3
Comments
This package works by route name. So try from "post" and to "post". Does that work? |
seems to work but not really in my use case ( the yield data just vanish) pad |
Ah. The problem is that the template doesnt change so it doesnt know what to animation. |
My data was 'vanishing' on every route too, I found that simply removing the css class "overflow: hidden' solved it for me. |
There may be issues with data context until the next meteor version. Theres a PR about Template.instance() and template data context getting messed up with Template block helpers. |
@ccorcos could you point me in the right direction on how to manually trigger the animations? I'm currently dealing with a setup where I'm trying to transition between two routes using the same template but to no effect... |
So trick here is that I'm using _uihooks to trigger animations when blaze inserts or removes templates. However, if you route between the same template, then there is no insert or remove happening at the If you want to animate manually, then just use VelocityJS. But you will have a problem that Blaze is using the exact same DOM elements for both templates. |
@iamalexkempton check out my animation package for simple animations. It won't allow you to animate between those routes, because of the previously stated issue, but you could animate how the individual elements change. |
@ccorcos Thanks for the explanation Chet! This put me in a bit of a pickle. Funnily enough, I'm actually trying to do a "swipe between pages" sort of thing, but your other library only seems to work for non-dynamic routes. I've got a big app with lots of pages that I'd like to swipe between but the routes are of the |
Oy. Thats rough! Here's an idea for you, but its a little involved. You won't be able to swipe necessarily but you can use transitioner. You can try something like this
Then create a variable to keep track of which one you're looking at. Then do something like this:
So what you're doing is forcing Blaze to render a new post template in the 'second' I hope it works for you! This should allow you to use the transitioner. :) |
@ccorcos Thanks for your input Chet! Hopefully I'll be able to work something out. |
Few questions...
Is there a way to use transition for the same route with a different datacontext ?
In this case, how to manage the helper params
Can you provide a sample demo for this case?
To manage the waitOn perhaps use the subscriptions instead which doesnt force the loading template to be rendered?
Thank you
The text was updated successfully, but these errors were encountered: