• Overview
@angular/router

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

boolean

Determines if this route (and its subtree) should be detached to be reused later

@returnsboolean

store

void

Stores the detached route.

Storing a null value should erase the previously stored value.

@paramhandleDetachedRouteHandle | null
@returnsvoid

shouldAttach

boolean

Determines if this route (and its subtree) should be reattached

@returnsboolean

retrieve

DetachedRouteHandle | null

Retrieves the previously stored route

@returnsDetachedRouteHandle | null

shouldReuseRoute

boolean

Determines if a route should be reused

@returnsboolean
Jump to details