UNPKG

1.66 kBTypeScriptView Raw
1import { EventEmitter } from '@angular/core';
2import { NavController } from '../../providers/nav-controller';
3import { IonTabBar } from '../proxies';
4import { IonRouterOutlet } from './ion-router-outlet';
5import { StackEvent } from './stack-utils';
6export declare class IonTabs {
7 private navCtrl;
8 outlet: IonRouterOutlet;
9 tabBar: IonTabBar | undefined;
10 ionTabsWillChange: EventEmitter<{
11 tab: string;
12 }>;
13 ionTabsDidChange: EventEmitter<{
14 tab: string;
15 }>;
16 constructor(navCtrl: NavController);
17 /**
18 * @internal
19 */
20 onPageSelected(detail: StackEvent): void;
21 /**
22 * When a tab button is clicked, there are several scenarios:
23 * 1. If the selected tab is currently active (the tab button has been clicked
24 * again), then it should go to the root view for that tab.
25 *
26 * a. Get the saved root view from the router outlet. If the saved root view
27 * matches the tabRootUrl, set the route view to this view including the
28 * navigation extras.
29 * b. If the saved root view from the router outlet does
30 * not match, navigate to the tabRootUrl. No navigation extras are
31 * included.
32 *
33 * 2. If the current tab tab is not currently selected, get the last route
34 * view from the router outlet.
35 *
36 * a. If the last route view exists, navigate to that view including any
37 * navigation extras
38 * b. If the last route view doesn't exist, then navigate
39 * to the default tabRootUrl
40 */
41 select(tabOrEvent: string | CustomEvent): Promise<boolean>;
42 getSelected(): string | undefined;
43}