What it does
Provides a way to customize when activated routes get reused.
Class Overview
class RouteReuseStrategy {
shouldDetach
(route: ActivatedRouteSnapshot) : boolean
store
(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle) : void
shouldAttach
(route: ActivatedRouteSnapshot) : boolean
retrieve
(route: ActivatedRouteSnapshot) : DetachedRouteHandle
shouldReuseRoute
(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot) : boolean
}
Class Description
Class Details
shouldDetach(route: ActivatedRouteSnapshot) : boolean
Determines if this route (and its subtree) should be detached to be reused later
store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle) : void
Stores the detached route
shouldAttach(route: ActivatedRouteSnapshot) : boolean
Determines if this route (and its subtree) should be reattached
retrieve(route: ActivatedRouteSnapshot) : DetachedRouteHandle
Retrieves the previously stored route
shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot) : boolean
Determines if a route should be reused
exported from @angular/router/index, defined in @angular/router/src/route_reuse_strategy.ts