[develop | DONE | CHANGED] move CustomRouteReuseStrategy to openaireLibrary

This commit is contained in:
Alex Martzios 2024-05-01 11:25:12 +03:00
parent b054a823da
commit c4b57e91ab
1 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
import {ActivatedRouteSnapshot, BaseRouteReuseStrategy} from "@angular/router";
export class CustomRouteReuseStrategy extends BaseRouteReuseStrategy {
shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {
return future.routeConfig === curr.routeConfig || (!!future.routeConfig?.component && future.routeConfig?.component === curr.routeConfig?.component)
}
}