-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
feat(router): helper functions to convert class guards to functional #48709
Conversation
2f3f1b3
to
687d916
Compare
8ab452c
to
9dd2717
Compare
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
Reviewed-for: dev-infra
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.
reviewed-for: public-api, global-docs-approvers
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.
reviewed-for: public-api
This commit introduces helper functions to easily convert `Injectable`s with functions compatible with `Route` guards to the corresponding guard functions. These functions will serve to aid in migrating off of the now deprecated class-based guards, but also provide an easy avenue to still defining guards as `Injectable` classes if that is desired.
3575388
to
d101d04
Compare
d101d04
to
85a5856
Compare
This PR was merged into the repository by commit 455c728. |
@atscott |
@destus90 there will be a migration |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commit introduces helper functions to easily convert
Injectable
s with functions compatible withRoute
guards to the corresponding guard functions. These functions will serve to aid in migrating off of the now deprecated class-based guards, but also provide an easy avenue to still defining guards asInjectable
classes if that is desired.Reviewer notes: Open to bikeshedding the API here. We could just have separate functions for each type of guard. I thought grouping them would help in discovery but maybe it's more confusing than the alternative.