tabs.js 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. var __extends = (this && this.__extends) || (function () {
  2. var extendStatics = Object.setPrototypeOf ||
  3. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  4. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  5. return function (d, b) {
  6. extendStatics(d, b);
  7. function __() { this.constructor = d; }
  8. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  9. };
  10. })();
  11. import { Component, ElementRef, EventEmitter, Input, Optional, Output, Renderer, ViewChild, ViewContainerRef, ViewEncapsulation, forwardRef } from '@angular/core';
  12. import { Subject } from 'rxjs/Subject';
  13. import 'rxjs/add/operator/takeUntil';
  14. import { App } from '../app/app';
  15. import { Config } from '../../config/config';
  16. import { DeepLinker } from '../../navigation/deep-linker';
  17. import { Ion } from '../ion';
  18. import { isBlank, isPresent } from '../../util/util';
  19. import { Keyboard } from '../../platform/keyboard';
  20. import { NavController } from '../../navigation/nav-controller';
  21. import { DIRECTION_SWITCH, getComponent } from '../../navigation/nav-util';
  22. import { formatUrlPart } from '../../navigation/url-serializer';
  23. import { RootNode } from '../split-pane/split-pane';
  24. import { Platform } from '../../platform/platform';
  25. import { TabHighlight } from './tab-highlight';
  26. import { ViewController } from '../../navigation/view-controller';
  27. /**
  28. * @name Tabs
  29. * @description
  30. * Tabs make it easy to navigate between different pages or functional
  31. * aspects of an app. The Tabs component, written as `<ion-tabs>`, is
  32. * a container of individual [Tab](../Tab/) components. Each individual `ion-tab`
  33. * is a declarative component for a [NavController](../../../navigation/NavController/)
  34. *
  35. * For more information on using nav controllers like Tab or [Nav](../../nav/Nav/),
  36. * take a look at the [NavController API Docs](../../../navigation/NavController/).
  37. *
  38. * ### Placement
  39. *
  40. * The position of the tabs relative to the content varies based on
  41. * the mode. The tabs are placed at the bottom of the screen
  42. * for iOS and Android, and at the top for Windows by default. The position can
  43. * be configured using the `tabsPlacement` attribute on the `<ion-tabs>` component,
  44. * or in an app's [config](../../config/Config/).
  45. * See the [Input Properties](#input-properties) below for the available
  46. * values of `tabsPlacement`.
  47. *
  48. * ### Layout
  49. *
  50. * The layout for all of the tabs can be defined using the `tabsLayout`
  51. * property. If the individual tab has a title and icon, the icons will
  52. * show on top of the title by default. All tabs can be changed by setting
  53. * the value of `tabsLayout` on the `<ion-tabs>` element, or in your
  54. * app's [config](../../config/Config/). For example, this is useful if
  55. * you want to show tabs with a title only on Android, but show icons
  56. * and a title for iOS. See the [Input Properties](#input-properties)
  57. * below for the available values of `tabsLayout`.
  58. *
  59. * ### Selecting a Tab
  60. *
  61. * There are different ways you can select a specific tab from the tabs
  62. * component. You can use the `selectedIndex` property to set the index
  63. * on the `<ion-tabs>` element, or you can call `select()` from the `Tabs`
  64. * instance after creation. See [usage](#usage) below for more information.
  65. *
  66. * @usage
  67. *
  68. * You can add a basic tabs template to a `@Component` using the following
  69. * template:
  70. *
  71. * ```html
  72. * <ion-tabs>
  73. * <ion-tab [root]="tab1Root"></ion-tab>
  74. * <ion-tab [root]="tab2Root"></ion-tab>
  75. * <ion-tab [root]="tab3Root"></ion-tab>
  76. * </ion-tabs>
  77. * ```
  78. *
  79. * Where `tab1Root`, `tab2Root`, and `tab3Root` are each a page:
  80. *
  81. *```ts
  82. * @Component({
  83. * templateUrl: 'build/pages/tabs/tabs.html'
  84. * })
  85. * export class TabsPage {
  86. * // this tells the tabs component which Pages
  87. * // should be each tab's root Page
  88. * tab1Root = Page1;
  89. * tab2Root = Page2;
  90. * tab3Root = Page3;
  91. *
  92. * constructor() {
  93. *
  94. * }
  95. * }
  96. *```
  97. *
  98. * By default, the first tab will be selected upon navigation to the
  99. * Tabs page. We can change the selected tab by using `selectedIndex`
  100. * on the `<ion-tabs>` element:
  101. *
  102. * ```html
  103. * <ion-tabs selectedIndex="2">
  104. * <ion-tab [root]="tab1Root"></ion-tab>
  105. * <ion-tab [root]="tab2Root"></ion-tab>
  106. * <ion-tab [root]="tab3Root"></ion-tab>
  107. * </ion-tabs>
  108. * ```
  109. *
  110. * Since the index starts at `0`, this will select the 3rd tab which has
  111. * root set to `tab3Root`. If you wanted to change it dynamically from
  112. * your class, you could use [property binding](https://angular.io/docs/ts/latest/guide/template-syntax.html#!#property-binding).
  113. *
  114. * Alternatively, you can grab the `Tabs` instance and call the `select()`
  115. * method. This requires the `<ion-tabs>` element to have an `id`. For
  116. * example, set the value of `id` to `myTabs`:
  117. *
  118. * ```html
  119. * <ion-tabs #myTabs>
  120. * <ion-tab [root]="tab1Root"></ion-tab>
  121. * <ion-tab [root]="tab2Root"></ion-tab>
  122. * <ion-tab [root]="tab3Root"></ion-tab>
  123. * </ion-tabs>
  124. * ```
  125. *
  126. * Then in your class you can grab the `Tabs` instance and call `select()`,
  127. * passing the index of the tab as the argument. Here we're grabbing the tabs
  128. * by using ViewChild.
  129. *
  130. *```ts
  131. * export class TabsPage {
  132. *
  133. * @ViewChild('myTabs') tabRef: Tabs;
  134. *
  135. * ionViewDidEnter() {
  136. * this.tabRef.select(2);
  137. * }
  138. *
  139. * }
  140. *```
  141. *
  142. * You can also switch tabs from a child component by calling `select()` on the
  143. * parent view using the `NavController` instance. For example, assuming you have
  144. * a `TabsPage` component, you could call the following from any of the child
  145. * components to switch to `TabsRoot3`:
  146. *
  147. *```ts
  148. * switchTabs() {
  149. * this.navCtrl.parent.select(2);
  150. * }
  151. *```
  152. * @demo /docs/demos/src/tabs/
  153. *
  154. * @see {@link /docs/components#tabs Tabs Component Docs}
  155. * @see {@link ../Tab Tab API Docs}
  156. * @see {@link ../../config/Config Config API Docs}
  157. *
  158. */
  159. var Tabs = (function (_super) {
  160. __extends(Tabs, _super);
  161. function Tabs(parent, viewCtrl, _app, config, elementRef, _plt, renderer, _linker, keyboard) {
  162. var _this = _super.call(this, config, elementRef, renderer, 'tabs') || this;
  163. _this.viewCtrl = viewCtrl;
  164. _this._app = _app;
  165. _this._plt = _plt;
  166. _this._linker = _linker;
  167. /** @internal */
  168. _this._ids = -1;
  169. /** @internal */
  170. _this._tabs = [];
  171. /** @internal */
  172. _this._selectHistory = [];
  173. /** @internal */
  174. _this._onDestroy = new Subject();
  175. /**
  176. * @output {any} Emitted when the tab changes.
  177. */
  178. _this.ionChange = new EventEmitter();
  179. _this.parent = parent;
  180. _this.id = 't' + (++tabIds);
  181. _this._sbPadding = config.getBoolean('statusbarPadding');
  182. _this.tabsHighlight = config.getBoolean('tabsHighlight');
  183. if (_this.parent) {
  184. // this Tabs has a parent Nav
  185. _this.parent.registerChildNav(_this);
  186. }
  187. else if (viewCtrl && viewCtrl.getNav()) {
  188. // this Nav was opened from a modal
  189. _this.parent = viewCtrl.getNav();
  190. _this.parent.registerChildNav(_this);
  191. }
  192. else if (_this._app) {
  193. // this is the root navcontroller for the entire app
  194. _this._app.registerRootNav(_this);
  195. }
  196. // Tabs may also be an actual ViewController which was navigated to
  197. // if Tabs is static and not navigated to within a NavController
  198. // then skip this and don't treat it as it's own ViewController
  199. if (viewCtrl) {
  200. viewCtrl._setContent(_this);
  201. viewCtrl._setContentRef(elementRef);
  202. }
  203. var keyboardResizes = config.getBoolean('keyboardResizes', false);
  204. if (keyboard && keyboardResizes) {
  205. keyboard.willHide
  206. .takeUntil(_this._onDestroy)
  207. .subscribe(function () {
  208. _this._plt.timeout(function () { return _this.setTabbarHidden(false); }, 50);
  209. });
  210. keyboard.willShow
  211. .takeUntil(_this._onDestroy)
  212. .subscribe(function () { return _this.setTabbarHidden(true); });
  213. }
  214. return _this;
  215. }
  216. /**
  217. * @internal
  218. */
  219. Tabs.prototype.setTabbarHidden = function (tabbarHidden) {
  220. this.setElementClass('tabbar-hidden', tabbarHidden);
  221. this.resize();
  222. };
  223. /**
  224. * @internal
  225. */
  226. Tabs.prototype.ngOnDestroy = function () {
  227. this._onDestroy.next();
  228. if (this.parent) {
  229. this.parent.unregisterChildNav(this);
  230. }
  231. else {
  232. this._app.unregisterRootNav(this);
  233. }
  234. };
  235. /**
  236. * @internal
  237. */
  238. Tabs.prototype.ngAfterViewInit = function () {
  239. var _this = this;
  240. this._setConfig('tabsPlacement', 'bottom');
  241. this._setConfig('tabsLayout', 'icon-top');
  242. this._setConfig('tabsHighlight', this.tabsHighlight);
  243. if (this.tabsHighlight) {
  244. this._plt.resize
  245. .takeUntil(this._onDestroy)
  246. .subscribe(function () { return _this._highlight.select(_this.getSelected()); });
  247. }
  248. this.initTabs();
  249. };
  250. /**
  251. * @internal
  252. */
  253. Tabs.prototype.initTabs = function () {
  254. var _this = this;
  255. // get the selected index from the input
  256. // otherwise default it to use the first index
  257. var selectedIndex = (isBlank(this.selectedIndex) ? 0 : parseInt(this.selectedIndex, 10));
  258. // now see if the deep linker can find a tab index
  259. var tabsSegment = this._linker.getSegmentByNavIdOrName(this.id, this.name);
  260. if (tabsSegment) {
  261. // we found a segment which probably represents which tab to select
  262. selectedIndex = this._getSelectedTabIndex(tabsSegment.secondaryId, selectedIndex);
  263. }
  264. // get the selectedIndex and ensure it isn't hidden or disabled
  265. var selectedTab = this._tabs.find(function (t, i) { return i === selectedIndex && t.enabled && t.show; });
  266. if (!selectedTab) {
  267. // wasn't able to select the tab they wanted
  268. // try to find the first tab that's available
  269. selectedTab = this._tabs.find(function (t) { return t.enabled && t.show; });
  270. }
  271. var promise = Promise.resolve();
  272. if (selectedTab) {
  273. selectedTab._segment = tabsSegment;
  274. promise = this.select(selectedTab);
  275. }
  276. return promise.then(function () {
  277. // set the initial href attribute values for each tab
  278. _this._tabs.forEach(function (t) {
  279. t.updateHref(t.root, t.rootParams);
  280. });
  281. });
  282. };
  283. /**
  284. * @internal
  285. */
  286. Tabs.prototype._setConfig = function (attrKey, fallback) {
  287. var val = this[attrKey];
  288. if (isBlank(val)) {
  289. val = this._config.get(attrKey, fallback);
  290. }
  291. this.setElementAttribute(attrKey, val);
  292. };
  293. /**
  294. * @hidden
  295. */
  296. Tabs.prototype.add = function (tab) {
  297. this._tabs.push(tab);
  298. return this.id + '-' + (++this._ids);
  299. };
  300. /**
  301. * @param {number|Tab} tabOrIndex Index, or the Tab instance, of the tab to select.
  302. */
  303. Tabs.prototype.select = function (tabOrIndex, opts, fromUrl) {
  304. var _this = this;
  305. if (opts === void 0) { opts = {}; }
  306. if (fromUrl === void 0) { fromUrl = false; }
  307. var selectedTab = (typeof tabOrIndex === 'number' ? this.getByIndex(tabOrIndex) : tabOrIndex);
  308. if (isBlank(selectedTab)) {
  309. return Promise.resolve();
  310. }
  311. // If the selected tab is the current selected tab, we do not switch
  312. var currentTab = this.getSelected();
  313. if (selectedTab === currentTab && currentTab.getActive()) {
  314. return this._updateCurrentTab(selectedTab, fromUrl);
  315. }
  316. // If the selected tab does not have a root, we do not switch (#9392)
  317. // it's possible the tab is only for opening modal's or signing out
  318. // and doesn't actually have content. In the case there's no content
  319. // for a tab then do nothing and leave the current view as is
  320. if (selectedTab.root) {
  321. // At this point we are going to perform a page switch
  322. // Let's fire willLeave in the current tab page
  323. var currentPage;
  324. if (currentTab) {
  325. currentPage = currentTab.getActive();
  326. currentPage && currentPage._willLeave(false);
  327. }
  328. // Fire willEnter in the new selected tab
  329. var selectedPage_1 = selectedTab.getActive();
  330. selectedPage_1 && selectedPage_1._willEnter();
  331. // Let's start the transition
  332. opts.animate = false;
  333. return selectedTab.load(opts).then(function () {
  334. _this._tabSwitchEnd(selectedTab, selectedPage_1, currentPage);
  335. if (opts.updateUrl !== false) {
  336. _this._linker.navChange(DIRECTION_SWITCH);
  337. }
  338. (void 0) /* assert */;
  339. _this._fireChangeEvent(selectedTab);
  340. });
  341. }
  342. else {
  343. this._fireChangeEvent(selectedTab);
  344. return Promise.resolve();
  345. }
  346. };
  347. Tabs.prototype._fireChangeEvent = function (selectedTab) {
  348. selectedTab.ionSelect.emit(selectedTab);
  349. this.ionChange.emit(selectedTab);
  350. };
  351. Tabs.prototype._tabSwitchEnd = function (selectedTab, selectedPage, currentPage) {
  352. (void 0) /* assert */;
  353. (void 0) /* assert */;
  354. // Update tabs selection state
  355. var tabs = this._tabs;
  356. var tab;
  357. for (var i = 0; i < tabs.length; i++) {
  358. tab = tabs[i];
  359. tab.setSelected(tab === selectedTab);
  360. }
  361. if (this.tabsHighlight) {
  362. this._highlight.select(selectedTab);
  363. }
  364. // Fire didEnter/didLeave lifecycle events
  365. if (selectedPage) {
  366. selectedPage._didEnter();
  367. this._app.viewDidEnter.emit(selectedPage);
  368. }
  369. if (currentPage) {
  370. currentPage && currentPage._didLeave();
  371. this._app.viewDidLeave.emit(currentPage);
  372. }
  373. // track the order of which tabs have been selected, by their index
  374. // do not track if the tab index is the same as the previous
  375. if (this._selectHistory[this._selectHistory.length - 1] !== selectedTab.id) {
  376. this._selectHistory.push(selectedTab.id);
  377. }
  378. };
  379. /**
  380. * Get the previously selected Tab which is currently not disabled or hidden.
  381. * @param {boolean} trimHistory If the selection history should be trimmed up to the previous tab selection or not.
  382. * @returns {Tab}
  383. */
  384. Tabs.prototype.previousTab = function (trimHistory) {
  385. var _this = this;
  386. if (trimHistory === void 0) { trimHistory = true; }
  387. // walk backwards through the tab selection history
  388. // and find the first previous tab that is enabled and shown
  389. (void 0) /* console.debug */;
  390. for (var i = this._selectHistory.length - 2; i >= 0; i--) {
  391. var tab = this._tabs.find(function (t) { return t.id === _this._selectHistory[i]; });
  392. if (tab && tab.enabled && tab.show) {
  393. if (trimHistory) {
  394. this._selectHistory.splice(i + 1);
  395. }
  396. return tab;
  397. }
  398. }
  399. return null;
  400. };
  401. /**
  402. * @param {number} index Index of the tab you want to get
  403. * @returns {Tab} Returns the tab who's index matches the one passed
  404. */
  405. Tabs.prototype.getByIndex = function (index) {
  406. return this._tabs[index];
  407. };
  408. /**
  409. * @return {Tab} Returns the currently selected tab
  410. */
  411. Tabs.prototype.getSelected = function () {
  412. var tabs = this._tabs;
  413. for (var i = 0; i < tabs.length; i++) {
  414. if (tabs[i].isSelected) {
  415. return tabs[i];
  416. }
  417. }
  418. return null;
  419. };
  420. /**
  421. * @internal
  422. */
  423. Tabs.prototype.getActiveChildNavs = function () {
  424. var selected = this.getSelected();
  425. return selected ? [selected] : [];
  426. };
  427. /**
  428. * @internal
  429. */
  430. Tabs.prototype.getAllChildNavs = function () {
  431. return this._tabs;
  432. };
  433. /**
  434. * @internal
  435. */
  436. Tabs.prototype.getIndex = function (tab) {
  437. return this._tabs.indexOf(tab);
  438. };
  439. /**
  440. * @internal
  441. */
  442. Tabs.prototype.length = function () {
  443. return this._tabs.length;
  444. };
  445. /**
  446. * "Touch" the active tab, going back to the root view of the tab
  447. * or optionally letting the tab handle the event
  448. */
  449. Tabs.prototype._updateCurrentTab = function (tab, fromUrl) {
  450. var active = tab.getActive();
  451. if (active) {
  452. if (fromUrl && tab._segment) {
  453. // see if the view controller exists
  454. var vc = tab.getViewById(tab._segment.name);
  455. if (vc) {
  456. // the view is already in the stack
  457. return tab.popTo(vc, {
  458. animate: false,
  459. updateUrl: false,
  460. });
  461. }
  462. else if (tab._views.length === 0 && tab._segment.defaultHistory && tab._segment.defaultHistory.length) {
  463. return this._linker.initViews(tab._segment).then(function (views) {
  464. return tab.setPages(views, {
  465. animate: false, updateUrl: false
  466. });
  467. }).then(function () {
  468. tab._segment = null;
  469. });
  470. }
  471. else {
  472. return tab.setRoot(tab._segment.name, tab._segment.data, {
  473. animate: false, updateUrl: false
  474. }).then(function () {
  475. tab._segment = null;
  476. });
  477. }
  478. }
  479. else if (active._cmp && active._cmp.instance.ionSelected) {
  480. // if they have a custom tab selected handler, call it
  481. active._cmp.instance.ionSelected();
  482. return Promise.resolve();
  483. }
  484. else if (tab.length() > 1) {
  485. // if we're a few pages deep, pop to root
  486. return tab.popToRoot();
  487. }
  488. else {
  489. return getComponent(this._linker, tab.root).then(function (viewController) {
  490. if (viewController.component !== active.component) {
  491. // Otherwise, if the page we're on is not our real root
  492. // reset it to our default root type
  493. return tab.setRoot(tab.root);
  494. }
  495. }).catch(function () {
  496. (void 0) /* console.debug */;
  497. });
  498. }
  499. }
  500. };
  501. /**
  502. * @internal
  503. * DOM WRITE
  504. */
  505. Tabs.prototype.setTabbarPosition = function (top, bottom) {
  506. if (this._top !== top || this._bottom !== bottom) {
  507. var tabbarEle = this._tabbar.nativeElement;
  508. tabbarEle.style.top = (top > -1 ? top + 'px' : '');
  509. tabbarEle.style.bottom = (bottom > -1 ? bottom + 'px' : '');
  510. tabbarEle.classList.add('show-tabbar');
  511. this._top = top;
  512. this._bottom = bottom;
  513. }
  514. };
  515. /**
  516. * @internal
  517. */
  518. Tabs.prototype.resize = function () {
  519. var tab = this.getSelected();
  520. tab && tab.resize();
  521. };
  522. /**
  523. * @internal
  524. */
  525. Tabs.prototype.initPane = function () {
  526. var isMain = this._elementRef.nativeElement.hasAttribute('main');
  527. return isMain;
  528. };
  529. /**
  530. * @internal
  531. */
  532. Tabs.prototype.paneChanged = function (isPane) {
  533. if (isPane) {
  534. this.resize();
  535. }
  536. };
  537. Tabs.prototype.goToRoot = function (opts) {
  538. if (this._tabs.length) {
  539. return this.select(this._tabs[0], opts);
  540. }
  541. };
  542. /*
  543. * @private
  544. */
  545. Tabs.prototype.getType = function () {
  546. return 'tabs';
  547. };
  548. /*
  549. * @private
  550. */
  551. Tabs.prototype.getSecondaryIdentifier = function () {
  552. var tabs = this.getActiveChildNavs();
  553. if (tabs && tabs.length) {
  554. return this._linker._getTabSelector(tabs[0]);
  555. }
  556. return '';
  557. };
  558. /**
  559. * @private
  560. */
  561. Tabs.prototype._getSelectedTabIndex = function (secondaryId, fallbackIndex) {
  562. if (secondaryId === void 0) { secondaryId = ''; }
  563. if (fallbackIndex === void 0) { fallbackIndex = 0; }
  564. // we found a segment which probably represents which tab to select
  565. var indexMatch = secondaryId.match(/tab-(\d+)/);
  566. if (indexMatch) {
  567. // awesome, the segment name was something "tab-0", and
  568. // the numbe represents which tab to select
  569. return parseInt(indexMatch[1], 10);
  570. }
  571. // wasn't in the "tab-0" format so maybe it's using a word
  572. var tab = this._tabs.find(function (t) {
  573. return (isPresent(t.tabUrlPath) && t.tabUrlPath === secondaryId) ||
  574. (isPresent(t.tabTitle) && formatUrlPart(t.tabTitle) === secondaryId);
  575. });
  576. return isPresent(tab) ? tab.index : fallbackIndex;
  577. };
  578. Tabs.decorators = [
  579. { type: Component, args: [{
  580. selector: 'ion-tabs',
  581. template: '<div class="tabbar" role="tablist" #tabbar>' +
  582. '<a *ngFor="let t of _tabs" [tab]="t" class="tab-button" role="tab" href="#" (ionSelect)="select(t)"></a>' +
  583. '<div class="tab-highlight"></div>' +
  584. '</div>' +
  585. '<ng-content></ng-content>' +
  586. '<div #portal tab-portal></div>',
  587. encapsulation: ViewEncapsulation.None,
  588. providers: [{ provide: RootNode, useExisting: forwardRef(function () { return Tabs; }) }]
  589. },] },
  590. ];
  591. /** @nocollapse */
  592. Tabs.ctorParameters = function () { return [
  593. { type: NavController, decorators: [{ type: Optional },] },
  594. { type: ViewController, decorators: [{ type: Optional },] },
  595. { type: App, },
  596. { type: Config, },
  597. { type: ElementRef, },
  598. { type: Platform, },
  599. { type: Renderer, },
  600. { type: DeepLinker, },
  601. { type: Keyboard, },
  602. ]; };
  603. Tabs.propDecorators = {
  604. 'name': [{ type: Input },],
  605. 'selectedIndex': [{ type: Input },],
  606. 'tabsLayout': [{ type: Input },],
  607. 'tabsPlacement': [{ type: Input },],
  608. 'tabsHighlight': [{ type: Input },],
  609. 'ionChange': [{ type: Output },],
  610. '_highlight': [{ type: ViewChild, args: [TabHighlight,] },],
  611. '_tabbar': [{ type: ViewChild, args: ['tabbar',] },],
  612. 'portal': [{ type: ViewChild, args: ['portal', { read: ViewContainerRef },] },],
  613. };
  614. return Tabs;
  615. }(Ion));
  616. export { Tabs };
  617. var tabIds = -1;
  618. //# sourceMappingURL=tabs.js.map