@danillo10 wrote:
How to call a function that is inside my “ConfigPage” class after the action registerbutton is pressed inside the “ConfigPage”;
this.platform.registerBackButtonAction(() => { let activePortal = this.ionicApp._loadingPortal.getActive() || this.ionicApp._modalPortal.getActive() || this.ionicApp._toastPortal.getActive() || this.ionicApp._overlayPortal.getActive(); let view = this.nav.getActive(); let currentRootPage = view.component; if (activePortal) { activePortal.dismiss(); } else if (this.menuCtrl.isOpen()) { this.menuCtrl.close(); } else if (this.nav.canGoBack() || view && view.isOverlay) { this.nav.pop(); } else if (currentRootPage == HomePage) { this.appMinimize.minimize().then( success => console.log('Fechado'), err => console.log('Algo errado:') ); } else if (currentRootPage == OrcamentoPage) { this.platform.exitApp(); }else if (currentRootPage == PreferenciasPage) { this.nav.setRoot(OrcamentoPage); }else if (currentRootPage == CargaPage) { this.nav.setRoot(OrcamentoPage); }else if (currentRootPage == EnviarOrcamentoPage) { this.nav.setRoot(OrcamentoPage); } else if (currentRootPage == CarrinhoPage) { this.nav.setRoot(OrcamentoPage); } else if (currentRootPage == FinalizaPage) { this.nav.setRoot(OrcamentoPage); } else if (currentRootPage == ConfigPage) { this.nav.setRoot(OrcamentoPage); } else if ( currentRootPage == PedidosPage) { this.nav.setRoot(OrcamentoPage) } });
Posts: 1
Participants: 1