Skip to content

feat(router): Add info property to NavigationExtras#53303

Closed
atscott wants to merge 1 commit intoangular:mainfrom
atscott:navigationInfo
Closed

feat(router): Add info property to NavigationExtras#53303
atscott wants to merge 1 commit intoangular:mainfrom
atscott:navigationInfo

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Nov 30, 2023

This commit adds a property to the navigation options to allow developers to provide transient navigation info that is available for the duration of the navigation. This information can be retrieved at any time with Router.getCurrentNavigation()!.extras.info. Previously, developers were forced to either create a service to hold information like this or put it on the state object, which gets persisted to the session history.

This feature was partially motivated by the Navigation API and would be something we would want/need to have feature parity if/when the Router supports managing navigations with that instead of History.

@atscott atscott added feature Label used to distinguish feature request from other issues area: router target: minor This PR is targeted for the next minor release labels Nov 30, 2023
@ngbot ngbot bot added this to the Backlog milestone Nov 30, 2023
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Nov 30, 2023
@atscott atscott marked this pull request as ready for review December 1, 2023 18:43
@pullapprove pullapprove bot requested a review from AndrewKushnir December 1, 2023 19:56
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

@pullapprove pullapprove bot requested a review from dylhunn December 1, 2023 19:57
This commit adds a property to the navigation options to allow
developers to provide transient navigation info that is available for
the duration of the navigation. This information can be retrieved at any
time with `Router.getCurrentNavigation()!.extras.info`. Previously,
developers were forced to either create a service to hold information
like this or put it on the `state` object, which gets persisted to the
session history.

This feature was partially motivated by the [Navigation API](https://github.com/WICG/navigation-api#example-using-info)
and would be something we would want/need to have feature parity if/when the
Router supports managing navigations with that instead of `History`.
Copy link
Contributor

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

@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Dec 6, 2023
@dylhunn
Copy link
Contributor

dylhunn commented Dec 6, 2023

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

@dylhunn dylhunn closed this in 5c1d441 Dec 6, 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 Jan 6, 2024
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
This commit adds a property to the navigation options to allow
developers to provide transient navigation info that is available for
the duration of the navigation. This information can be retrieved at any
time with `Router.getCurrentNavigation()!.extras.info`. Previously,
developers were forced to either create a service to hold information
like this or put it on the `state` object, which gets persisted to the
session history.

This feature was partially motivated by the [Navigation API](https://github.com/WICG/navigation-api#example-using-info)
and would be something we would want/need to have feature parity if/when the
Router supports managing navigations with that instead of `History`.

PR Close angular#53303
rlmestre pushed a commit to rlmestre/angular that referenced this pull request Jan 26, 2024
This commit adds a property to the navigation options to allow
developers to provide transient navigation info that is available for
the duration of the navigation. This information can be retrieved at any
time with `Router.getCurrentNavigation()!.extras.info`. Previously,
developers were forced to either create a service to hold information
like this or put it on the `state` object, which gets persisted to the
session history.

This feature was partially motivated by the [Navigation API](https://github.com/WICG/navigation-api#example-using-info)
and would be something we would want/need to have feature parity if/when the
Router supports managing navigations with that instead of `History`.

PR Close angular#53303
amilamen pushed a commit to amilamen/angular that referenced this pull request Jan 26, 2024
This commit adds a property to the navigation options to allow
developers to provide transient navigation info that is available for
the duration of the navigation. This information can be retrieved at any
time with `Router.getCurrentNavigation()!.extras.info`. Previously,
developers were forced to either create a service to hold information
like this or put it on the `state` object, which gets persisted to the
session history.

This feature was partially motivated by the [Navigation API](https://github.com/WICG/navigation-api#example-using-info)
and would be something we would want/need to have feature parity if/when the
Router supports managing navigations with that instead of `History`.

PR Close angular#53303
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 feature Label used to distinguish feature request from other issues target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants