UNPKG

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