Skip to content
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

Enable calling routie route declaration multiple times #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Enable calling routie route declaration multiple times #32

wants to merge 2 commits into from

Conversation

rubenspgcavalcante
Copy link

Correction for Issue " Multiple routes trigger first one to fire multiple times #30 "
Added a third param to routie, forceCheck (default true). If forceCheck is false don't force reload, and doing it the current hash is not matched.
Declaring will continue as especified:
routie('route', function(){...});

Declaring multiple times:
routie('route1', function(){...}, false);
routie('route2', function(){...}, false);
routie.apply();

The apply method will call reload(), but ensures it's called only once.

Added a third param to routie (forceCheck) default true, where if false, don't call the reload.
Added method apply, to force reload but ensures a unique call to it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants