RouteReuseStrategy
Class
stable
Provides a way to customize when activated routes get reused.
API
abstract class RouteReuseStrategy { abstract shouldDetach(route: ActivatedRouteSnapshot): boolean; abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void; abstract shouldAttach(route: ActivatedRouteSnapshot): boolean; abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null; abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;}
shouldDetach
booleanDetermines if this route (and its subtree) should be detached to be reused later
@returns
booleanstore
voidStores the detached route.
Storing a null value should erase the previously stored value.
@returns
voidshouldAttach
booleanDetermines if this route (and its subtree) should be reattached
@returns
booleanretrieve
DetachedRouteHandle | nullRetrieves the previously stored route
@returns
DetachedRouteHandle | nullshouldReuseRoute
booleanDetermines if a route should be reused
@returns
booleanJump to details