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

feat(migrations): Migration to remove Router guard and resolver interfaces #49337

Closed

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Mar 6, 2023

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.

@atscott atscott added target: major This PR is targeted for the next major release area: migrations Issues related to `ng update` migrations labels Mar 6, 2023
@ngbot ngbot bot modified the milestone: Backlog Mar 6, 2023
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Mar 6, 2023
@atscott atscott force-pushed the deprecatedguardandresolveinterfaces branch 5 times, most recently from d5ff561 to 5a3d5ce Compare March 8, 2023 01:14
@atscott atscott force-pushed the deprecatedguardandresolveinterfaces branch 3 times, most recently from 27e67ba to 2ce08ae Compare March 14, 2023 19:07
@atscott atscott force-pushed the deprecatedguardandresolveinterfaces branch from 2ce08ae to e96e6e3 Compare March 22, 2023 15:59
@atscott atscott marked this pull request as ready for review March 22, 2023 15:59
@pullapprove pullapprove bot requested a review from crisbeto March 22, 2023 15:59
@atscott atscott force-pushed the deprecatedguardandresolveinterfaces branch from 0b855f8 to 956a4ea Compare March 22, 2023 20:10
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some optional comments that can be ignored.

@atscott atscott force-pushed the deprecatedguardandresolveinterfaces branch 2 times, most recently from 48cef5a to 800f091 Compare March 23, 2023 18:08
@atscott atscott added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Mar 23, 2023
@atscott
Copy link
Contributor Author

atscott commented Mar 23, 2023

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.
@atscott atscott force-pushed the deprecatedguardandresolveinterfaces branch from 800f091 to a487b05 Compare March 27, 2023 19:44
@atscott
Copy link
Contributor Author

atscott commented Mar 27, 2023

This PR was merged into the repository by commit 5e5dac2.

@atscott atscott closed this in 5e5dac2 Mar 27, 2023
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: migrations Issues related to `ng update` migrations detected: feature PR contains a feature commit merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants