import { RouteReuseStrategy , ActivatedRouteSnapshot } from '@angular/router' ; import { ReuseTabService } from './reuse-tab.service' ; export class ReuseTabStrategy implements RouteReuseStrategy { constructor ( private srv ) { } shouldDetach ( route ) { return this . srv . shouldDetach ( route ) ; } store ( route , handle ) { this . srv . store ( route , handle ) ; } shouldAttach ( route ) { return this . srv . shouldAttach ( route ) ; } retrieve ( route ) { return this . srv . retrieve ( route ) ; } shouldReuseRoute ( future , curr ) { return this . srv . shouldReuseRoute ( future , curr ) ; } }