Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(router): Add routerOutletData input to RouterOutlet directive #57051

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

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Jul 19, 2024

This commit adds an input to RouterOutlet that allows developers to pass data from a parent component to the outlet components. Setting the routerOutletData input on RouterOutlet makes the value available to the child component injectors via the ROUTER_OUTLET_DATA token. This token uses a Signal type to allow updating the input value and propagating it to the token rather than needing to make the value static.

resolves #46283

@atscott atscott added the target: minor This PR is targeted for the next minor release label Jul 19, 2024
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: router labels Jul 19, 2024
@ngbot ngbot bot added this to the Backlog milestone Jul 19, 2024
@atscott atscott marked this pull request as ready for review August 1, 2024 21:32
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a 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, fw-router

@pullapprove pullapprove bot requested a review from thePunderWoman August 4, 2024 20:50
Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

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

reviewed-for: fw-testing, public-api

This commit adds an input to `RouterOutlet` that allows developers to
pass data from a parent component to the outlet components.
Setting the `routerOutletData` input on `RouterOutlet` makes the value
available to the child component injectors via the `ROUTER_OUTLET_DATA`
token. This token uses a `Signal` type to allow updating the input value
and propogating it to the token rather than needing to make the value
static.

resolves angular#46283
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Aug 8, 2024
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit f271021.

The changes were merged into the following branches: main

@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 Sep 9, 2024
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.

Passing data into "router-outlet" child components
3 participants