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

fix(router): Only retrieve stored route when reuse strategy indicates it should reattach #30263

Closed
wants to merge 1 commit into from

Commits on Apr 13, 2021

  1. fix(router): Only retrieve stored route when reuse strategy indicates…

    … it should reattach
    
    When creating the router state, the `RouteReuseStrategy#retrieve` should
    only be called when `RouteReuseStrategy#shouldAttach` returns `true`.
    That is, we should only retrieve a stored route when the reuse strategy
    indicates that there is one stored and that it should be reattached.
    
    This now matches the behavior in the route activation:
    https://github.com/angular/angular/blob/1d12c50f63f90c91636185b2287e31e9c0291121/packages/router/src/operators/activate_routes.ts#L170-L172
    
    Fixes angular#23162
    dimakuba authored and atscott committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    df2efd2 View commit details
    Browse the repository at this point in the history