-
Notifications
You must be signed in to change notification settings - Fork 193
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
New triggers implementation with redirect support #172
Conversation
We don't support older browsers But at least, this allow us to run tests inside Phantom
@delgermurun check this. Give it a try and help me to figure out any issues? |
} | ||
// we need to trigger the above invalidations immediately | ||
// otherwise, we need to face some issues with route context swapping | ||
Tracker.flush(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check how flush behave if a user change the route from a template helper.
That's weird. But possible.
@arunoda Nice refactoring! Working good. What's the issues :)? |
@delgermurun I mean if there are any issues :) |
Everything looks good. I think we can do a release. |
Yeah. Do it. |
This is perfect, thanks Aronuda 👍 |
I'm trying to redirect to a sub-route of the current route, for instance from /foo to /foo/bar. This works (shows the right template for the router), but the URL ifself is not updated (still shows /foo). The same applies to my navigation bar which is testing for the route to highlight the right navigation elements. If I'm using FlowRouter.go() instead of redirect(), the same happens. How can I update the URL and my navigation template once a redirect happens? |
This is a re-implementation with our triggers API with redirect support with a clean codebase.
This is the implementation of the redirect API.
When someone route to
/
then he'll be redirected to/some-other-path
. In this case, action won't get called or any exit trigger if exists.This can be done for exit triggers as well.
We can also do this prevent route changes like this.
In the above case, it is impossible to leave from route
/
.Here are some properties of redirect