-
Notifications
You must be signed in to change notification settings - Fork 34
Added Router BeforeAll Hook #228
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
Added Router BeforeAll Hook #228
Conversation
suresh-gangumalla
commented
Nov 27, 2024
- Updated Router configuration to include router hooks along with routes from Application instance
- Executing router beforeAll hook on every route navigation
- Updated Router configuration to include router hooks along with routes from Application instance - Executing router beforeAll hook on every route navigation Signed-off-by: Suresh Kumar Gangumalla <[email protected]>
michielvandergeest
left a comment
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.
This code looks good, but as far as I understand it's now only possible to provide a router object in the ApplicationConfig
I think ideally we would keep the 'simple' configuration with direct routes (using the routes-property, along side the advanced configuration using the router-key.
If possible, the Typescript definitions should indicate that only 1 configuration (routes vs router) is allowed at the same time
Signed-off-by: Suresh Kumar Gangumalla <[email protected]>
index.d.ts
Outdated
| * Routes definition | ||
| * | ||
| * @example |
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.
mention here as well that router takes precedence
Signed-off-by: Suresh Kumar Gangumalla <[email protected]>
1. Updated beforeAll to beforeEach 2. Added note that router config take precendence over routes Signed-off-by: Suresh Kumar Gangumalla <[email protected]>
Updated Application type definition to accept only router or routes but not both and Application configuration can still defined without both router and routes as well. Signed-off-by: Suresh Kumar Gangumalla <[email protected]>
|
Test Results Summary: (Ran at: Thu Mar 13 09:43:57 UTC 2025) |
Signed-off-by: Suresh Kumar Gangumalla <[email protected]>
|
Test Results Summary: (Ran at: Thu Mar 13 10:30:55 UTC 2025) |
michielvandergeest
left a comment
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.
LGTM