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

Route metadata #147

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

Route metadata #147

wants to merge 4 commits into from

Conversation

chrisrng
Copy link
Contributor

@chrisrng chrisrng commented Jul 31, 2019

Adding Route Metadata as an option to pass in an object for a given route

router.add([{ path: "/post/1", handler: page, metadata: { test: 123 } }]);
result = router.recognize("/post/1");
result === [{ handler: page, params: {}, metadata: { test: 123 } }];

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

Successfully merging this pull request may close these issues.

None yet

2 participants