Skip to content

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

Closed
atscott wants to merge 1 commit into
angular:mainfrom
atscott:outletdata
Closed

atscott wants to merge 1 commit into
angular:mainfrom
atscott:outletdata

Conversation

@atscott

@atscott atscott commented Jul 19, 2024

Copy link
Copy Markdown
Contributor

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
Comment thread packages/router/test/directives/router_outlet.spec.ts Outdated
Comment thread packages/router/test/directives/router_outlet.spec.ts Outdated
Comment thread packages/router/test/directives/router_outlet.spec.ts Outdated
@atscott
atscott marked this pull request as ready for review August 1, 2024 21:32

@AndrewKushnir AndrewKushnir 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.

Reviewed-for: public-api, fw-router

@pullapprove
pullapprove Bot requested a review from thePunderWoman August 4, 2024 20:50

@thePunderWoman thePunderWoman 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.

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