router-outlet.d.ts 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. import { Location } from '@angular/common';
  2. import { ComponentRef, ElementRef, NgZone, OnDestroy, OnInit, EventEmitter, EnvironmentInjector } from '@angular/core';
  3. import type { Provider } from '@angular/core';
  4. import { OutletContext, Router, ActivatedRoute, Data } from '@angular/router';
  5. import type { AnimationBuilder } from '@ionic/core/components';
  6. import { RouteView, StackDidChangeEvent, StackWillChangeEvent } from './stack-utils';
  7. import * as i0 from "@angular/core";
  8. export declare abstract class IonRouterOutlet implements OnDestroy, OnInit {
  9. readonly parentOutlet?: IonRouterOutlet | undefined;
  10. abstract outletContent: any;
  11. nativeEl: HTMLIonRouterOutletElement;
  12. activatedView: RouteView | null;
  13. tabsPrefix: string | undefined;
  14. private _swipeGesture?;
  15. private stackCtrl;
  16. private proxyMap;
  17. private currentActivatedRoute$;
  18. private activated;
  19. /** @internal */
  20. get activatedComponentRef(): ComponentRef<any> | null;
  21. private _activatedRoute;
  22. /**
  23. * The name of the outlet
  24. */
  25. name: string;
  26. /** @internal */
  27. stackWillChange: EventEmitter<StackWillChangeEvent>;
  28. /** @internal */
  29. stackDidChange: EventEmitter<StackDidChangeEvent>;
  30. activateEvents: EventEmitter<any>;
  31. deactivateEvents: EventEmitter<any>;
  32. private parentContexts;
  33. private location;
  34. private environmentInjector;
  35. private inputBinder;
  36. /** @nodoc */
  37. readonly supportsBindingToComponentInputs = true;
  38. private config;
  39. private navCtrl;
  40. set animation(animation: AnimationBuilder);
  41. set animated(animated: boolean);
  42. set swipeGesture(swipe: boolean);
  43. constructor(name: string, tabs: string, commonLocation: Location, elementRef: ElementRef, router: Router, zone: NgZone, activatedRoute: ActivatedRoute, parentOutlet?: IonRouterOutlet | undefined);
  44. ngOnDestroy(): void;
  45. getContext(): OutletContext | null;
  46. ngOnInit(): void;
  47. private initializeOutletWithName;
  48. get isActivated(): boolean;
  49. get component(): Record<string, unknown>;
  50. get activatedRoute(): ActivatedRoute;
  51. get activatedRouteData(): Data;
  52. /**
  53. * Called when the `RouteReuseStrategy` instructs to detach the subtree
  54. */
  55. detach(): ComponentRef<any>;
  56. /**
  57. * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
  58. */
  59. attach(_ref: ComponentRef<any>, _activatedRoute: ActivatedRoute): void;
  60. deactivate(): void;
  61. activateWith(activatedRoute: ActivatedRoute, environmentInjector: EnvironmentInjector | null): void;
  62. /**
  63. * Returns `true` if there are pages in the stack to go back.
  64. */
  65. canGoBack(deep?: number, stackId?: string): boolean;
  66. /**
  67. * Resolves to `true` if it the outlet was able to sucessfully pop the last N pages.
  68. */
  69. pop(deep?: number, stackId?: string): Promise<boolean>;
  70. /**
  71. * Returns the URL of the active page of each stack.
  72. */
  73. getLastUrl(stackId?: string): string | undefined;
  74. /**
  75. * Returns the RouteView of the active page of each stack.
  76. * @internal
  77. */
  78. getLastRouteView(stackId?: string): RouteView | undefined;
  79. /**
  80. * Returns the root view in the tab stack.
  81. * @internal
  82. */
  83. getRootView(stackId?: string): RouteView | undefined;
  84. /**
  85. * Returns the active stack ID. In the context of ion-tabs, it means the active tab.
  86. */
  87. getActiveStackId(): string | undefined;
  88. /**
  89. * Since the activated route can change over the life time of a component in an ion router outlet, we create
  90. * a proxy so that we can update the values over time as a user navigates back to components already in the stack.
  91. */
  92. private createActivatedRouteProxy;
  93. /**
  94. * Create a wrapped observable that will switch to the latest activated route matched by the given component
  95. */
  96. private proxyObservable;
  97. /**
  98. * Updates the activated route proxy for the given component to the new incoming router state
  99. */
  100. private updateActivatedRouteProxy;
  101. static ɵfac: i0.ɵɵFactoryDeclaration<IonRouterOutlet, [{ attribute: "name"; }, { attribute: "tabs"; optional: true; }, null, null, null, null, null, { optional: true; skipSelf: true; }]>;
  102. static ɵdir: i0.ɵɵDirectiveDeclaration<IonRouterOutlet, "ion-router-outlet", ["outlet"], { "animated": { "alias": "animated"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "swipeGesture": { "alias": "swipeGesture"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "stackWillChange": "stackWillChange"; "stackDidChange": "stackDidChange"; "activateEvents": "activate"; "deactivateEvents": "deactivate"; }, never, never, false, never>;
  103. }
  104. export declare const provideComponentInputBinding: () => Provider;