Skip to content

feat(router): Execute RunGuardsAndResolvers function in injection context#64938

Merged
kirjs merged 2 commits into
angular:mainfrom
atscott:runguardsresolversinjectioncontext
Nov 20, 2025
Merged

feat(router): Execute RunGuardsAndResolvers function in injection context#64938
kirjs merged 2 commits into
angular:mainfrom
atscott:runguardsresolversinjectioncontext

Conversation

@atscott

@atscott atscott commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Allows more sophisticated checks based on information available in DI
(e.g. the router state). Use-cases have been described in #53944 / #31843 (comment)

resolves #53944

@atscott atscott added the target: minor This PR is targeted for the next minor release label Nov 6, 2025
@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: router labels Nov 6, 2025
@ngbot ngbot Bot added this to the Backlog milestone Nov 6, 2025
@atscott atscott force-pushed the runguardsresolversinjectioncontext branch 2 times, most recently from 8f055fd to 82888f8 Compare November 6, 2025 00:14
…text

Allows more sophisticated checks based on information available in DI
(e.g. the router state). Use-cases have been described in angular#53944 / angular#31843 (comment)

resolves angular#53944
@atscott atscott force-pushed the runguardsresolversinjectioncontext branch from 82888f8 to 7f22b66 Compare November 6, 2025 22:30
This eliminates the need to pass around the EnvironmentInjector
everywhere we need the injection context for a route.
@atscott atscott force-pushed the runguardsresolversinjectioncontext branch from 7f22b66 to 22664ce Compare November 7, 2025 19:26
@atscott atscott marked this pull request as ready for review November 7, 2025 19:34
@atscott

atscott commented Nov 10, 2025

Copy link
Copy Markdown
Contributor Author

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Nov 20, 2025
@alan-agius4 alan-agius4 removed the request for review from JeanMeche November 20, 2025 20:12
@kirjs kirjs merged commit 1ab461c into angular:main Nov 20, 2025
21 checks passed
@kirjs

kirjs commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Dec 21, 2025
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: router detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run runGuardsAndResolvers within injection context of the Route its part of

3 participants