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

Best way to detect param changes in the same route #147

Open
oskarrough opened this issue Apr 12, 2016 · 0 comments
Open

Best way to detect param changes in the same route #147

oskarrough opened this issue Apr 12, 2016 · 0 comments

Comments

@oskarrough
Copy link

Assuming the following route:

crossroads.addRoute('/chapters/{id}', id => {
  console.log(id);
});

What is the right way to detect a change from /chapters/1 to /chapters/2? The match method is called but I can't seem to access the previous param.

More specifically, I'm looking for a way to trigger a custom exit method with the id param as argument.

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

No branches or pull requests

1 participant