UNPKG

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