BaseRouteReuseStrategy
Class
This base route reuse strategy only reuses routes when the matched router configs are identical. This prevents components from being destroyed and recreated when just the route parameters, query parameters or fragment change (that is, the existing component is reused).
API
Description
abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {}
shouldDetach
booleanWhether the given route should detach for later reuse.
Always returns false for BaseRouteReuseStrategy.
@returns
booleanstore
voidA no-op; the route is never stored since this strategy never detaches routes for later re-use.
@returns
voidshouldAttach
booleanReturns false, meaning the route (and its subtree) is never reattached
@returns
booleanretrieve
DetachedRouteHandle | nullReturns null because this strategy does not store routes for later re-use.
@returns
DetachedRouteHandle | nullshouldReuseRoute
booleanDetermines if a route should be reused.
This strategy returns true when the future route config and current route config are
identical.
@returns
booleanJump to details