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(router): Add routerOutletData input to RouterOutlet directive #57051

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
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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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