routing.d.ts 1.2 KB

12345678910111213141516171819202122232425262728
  1. import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router';
  2. /**
  3. * Provides a way to customize when activated routes get reused.
  4. */
  5. export declare class IonicRouteStrategy implements RouteReuseStrategy {
  6. /**
  7. * Whether the given route should detach for later reuse.
  8. */
  9. shouldDetach(_route: ActivatedRouteSnapshot): boolean;
  10. /**
  11. * Returns `false`, meaning the route (and its subtree) is never reattached
  12. */
  13. shouldAttach(_route: ActivatedRouteSnapshot): boolean;
  14. /**
  15. * A no-op; the route is never stored since this strategy never detaches routes for later re-use.
  16. */
  17. store(_route: ActivatedRouteSnapshot, _detachedTree: DetachedRouteHandle): void;
  18. /**
  19. * Returns `null` because this strategy does not store routes for later re-use.
  20. */
  21. retrieve(_route: ActivatedRouteSnapshot): DetachedRouteHandle | null;
  22. /**
  23. * Determines if a route should be reused.
  24. * This strategy returns `true` when the future route config and
  25. * current route config are identical and all route parameters are identical.
  26. */
  27. shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;
  28. }