mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
a4ff071e3f
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 #23162 PR Close #30263