Skip to content

docs: clarify onSameUrlNavigation behavior - #42275

Closed
atscott wants to merge 1 commit into
angular:masterfrom
atscott:reloadroutedcomponents
Closed

atscott wants to merge 1 commit into
angular:masterfrom
atscott:reloadroutedcomponents

Conversation

@atscott

@atscott atscott commented May 24, 2021

Copy link
Copy Markdown
Contributor

onSameUrlNavigation only affects whether the Angular Router
processes the URL and runs it through the navigation pipeline,
retriggering redirects, guards, and resolvers. The name reload is a
little confusing because it does not reload the component. Developers
also need to implement a custom RouteReuseStrategy to trigger a
component reload on same URL navigation.

Fixes #21115

@atscott atscott added the target: patch This PR is targeted for the next patch release label May 24, 2021
@google-cla google-cla Bot added the cla: yes label May 24, 2021
@atscott
atscott force-pushed the reloadroutedcomponents branch from a4c1866 to 88734dc Compare May 24, 2021 16:12
@ngbot ngbot Bot added this to the Backlog milestone May 24, 2021

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

馃憤

Comment thread packages/router/src/router.ts Outdated
Comment thread packages/router/src/router.ts Outdated
@mary-poppins

Copy link
Copy Markdown

You can preview a4c1866 at https://pr42275-a4c1866.ngbuilds.io/.
You can preview 88734dc at https://pr42275-88734dc.ngbuilds.io/.

@atscott
atscott force-pushed the reloadroutedcomponents branch from 88734dc to 22b779f Compare June 9, 2021 16:23
`onSameUrlNavigation` only affects whether the Angular Router
processes the URL and runs it through the navigation pipeline,
retriggering redirects, guards, and resolvers. The name `reload` is a
little confusing because it does _not_ reload the component. Developers
_also_ need to implement a custom `RouteReuseStrategy` to trigger a
component reload on same URL navigation.

Fixes angular#21115
@atscott
atscott force-pushed the reloadroutedcomponents branch from 22b779f to c62171f Compare June 9, 2021 16:24
@mary-poppins

Copy link
Copy Markdown

You can preview c62171f at https://pr42275-c62171f.ngbuilds.io/.

@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Jun 9, 2021
@jessicajaniuk jessicajaniuk added action: merge The PR is ready for merge by the caretaker and removed action: merge The PR is ready for merge by the caretaker labels Jun 9, 2021
jessicajaniuk pushed a commit that referenced this pull request Jun 9, 2021
`onSameUrlNavigation` only affects whether the Angular Router
processes the URL and runs it through the navigation pipeline,
retriggering redirects, guards, and resolvers. The name `reload` is a
little confusing because it does _not_ reload the component. Developers
_also_ need to implement a custom `RouteReuseStrategy` to trigger a
component reload on same URL navigation.

Fixes #21115

PR Close #42275
@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 Jul 10, 2021
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 cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

onSameUrlNavigation doesn't re-load routed components

5 participants