mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
Merge branch 'fix-previousTab' of https://github.com/manucorporat/ionic
# Conflicts: # src/components/tabs/tabs.ts
This commit is contained in:
@ -384,15 +384,10 @@ export class Tabs extends Ion implements AfterViewInit {
|
|||||||
// it's possible the tab is only for opening modal's or signing out
|
// it's possible the tab is only for opening modal's or signing out
|
||||||
// and doesn't actually have content. In the case there's no content
|
// and doesn't actually have content. In the case there's no content
|
||||||
// for a tab then do nothing and leave the current view as is
|
// for a tab then do nothing and leave the current view as is
|
||||||
if (!selectedTab.root) {
|
if (selectedTab.root) {
|
||||||
selectedTab.ionSelect.emit(selectedTab);
|
|
||||||
this.ionChange.emit(selectedTab);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// At this point we are going to perform a page switch
|
// At this point we are going to perform a page switch
|
||||||
// Let's fire willLeave in the current tab page
|
// Let's fire willLeave in the current tab page
|
||||||
let currentPage: ViewController;
|
var currentPage: ViewController;
|
||||||
if (currentTab) {
|
if (currentTab) {
|
||||||
currentPage = currentTab.getActive();
|
currentPage = currentTab.getActive();
|
||||||
currentPage && currentPage._willLeave(false);
|
currentPage && currentPage._willLeave(false);
|
||||||
@ -412,10 +407,11 @@ export class Tabs extends Ion implements AfterViewInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_tabSwitchEnd(selectedTab: Tab, selectedPage: ViewController, currentPage: ViewController) {
|
|
||||||
selectedTab.ionSelect.emit(selectedTab);
|
selectedTab.ionSelect.emit(selectedTab);
|
||||||
this.ionChange.emit(selectedTab);
|
this.ionChange.emit(selectedTab);
|
||||||
|
}
|
||||||
|
|
||||||
|
_tabSwitchEnd(selectedTab: Tab, selectedPage: ViewController, currentPage: ViewController) {
|
||||||
// Update tabs selection state
|
// Update tabs selection state
|
||||||
const tabs = this._tabs;
|
const tabs = this._tabs;
|
||||||
let tab: Tab;
|
let tab: Tab;
|
||||||
|
Reference in New Issue
Block a user