feat(migrations): Migration to remove Router guard and resolver interfaces#49337
Closed
atscott wants to merge 3 commits intoangular:mainfrom
Closed
feat(migrations): Migration to remove Router guard and resolver interfaces#49337atscott wants to merge 3 commits intoangular:mainfrom
Router guard and resolver interfaces#49337atscott wants to merge 3 commits intoangular:mainfrom
Conversation
d5ff561 to
5a3d5ce
Compare
27e67ba to
2ce08ae
Compare
2ce08ae to
e96e6e3
Compare
crisbeto
reviewed
Mar 22, 2023
packages/core/schematics/migrations/guard-and-resolve-interfaces/util.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/migrations/guard-and-resolve-interfaces/util.ts
Outdated
Show resolved
Hide resolved
0b855f8 to
956a4ea
Compare
crisbeto
approved these changes
Mar 22, 2023
Member
crisbeto
left a comment
There was a problem hiding this comment.
LGTM with some optional comments that can be ignored.
packages/core/schematics/migrations/guard-and-resolve-interfaces/util.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/migrations/guard-and-resolve-interfaces/util.ts
Outdated
Show resolved
Hide resolved
packages/core/schematics/test/guard_and_resolve_interfaces_spec.ts
Outdated
Show resolved
Hide resolved
48cef5a to
800f091
Compare
Contributor
Author
|
caretaker note: schematics require manual patching of internal build files |
…erfaces The class-based guard and resolver interfaces are deprecated. The `Router` types only support functional guards definitions. Classes can still be used as the underlying implementation of functional guards and resolvers but there will not be an interface requiring a specific structure for those classes. There are also helper functions like `mapToCanActivate` that allow converting the existing class-based guards directly to functional guards at the route definition. This will be done in a separate migration.
800f091 to
a487b05
Compare
Contributor
Author
|
This PR was merged into the repository by commit 5e5dac2. |
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The class-based guard and resolver interfaces are deprecated. The
Routertypes only support functional guards definitions. Classes can still be used as the underlying implementation of functional guards and resolvers but there will not be an interface requiring a specific structure for those classes.There are also helper functions like
mapToCanActivatethat allow converting the existing class-based guards directly to functional guards at the route definition. This will be done in a separate migration.