How to activate RouteReuseStrategy only for specific routes
问题 Is there a way to implement RouteReuseStrategy only for specific routes? Meaning each route with children, getting its own custom implementation of RouteReuseStrategy , and whose methods only fire when a route in a specific 'tree' is activated. I currently use the code from this answer, but I want to expand it with the above logic if possible. 回答1: Create a custom route reuse strategy import { RouteReuseStrategy, ActivatedRouteSnapshot, DetachedRouteHandle } from "@angular/router"; export