Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

139
Views
Ionic 2: ¿cómo eliminar el panel dividido solo en la página de inicio de sesión?

Uso este código en app.html, el panel dividido funciona a la perfección. Pero el problema es que el panel funciona para todas las páginas, como iniciar sesión o registrarse, así que ayúdenme a evitar que el panel dividido funcione para todas las páginas.

 <ion-split-pane when="(min-width: 768px)"> <ion-menu [content]="content"> <ion-content id="Chat"> </ion-content> </ion-menu> <ion-nav [root]="rootPage" #content></ion-nav> </ion-split-pane>
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

 import { Component } from '@angular/core'; import { MenuController,IonicPage, NavController } from 'ionic-angular'; @IonicPage() @Component({ selector: 'page-signup', templateUrl: 'signup.html', }) export class SignUp { constructor(public navCtrl: NavController, public menu : MenuController) { this.menu.enable(false); this.menu.swipeEnable(false); } ionViewWillLeave(){ this.menu.enable(true); this.menu.swipeEnable(true); } }

Espero que esto ayude. simplemente deshabilite el menú y deslice el menú con ese panel dividido que se oculta automáticamente.

over 4 years ago · Santiago Trujillo Report

0

Según lo que hoeksms mencionó aquí , podría usar un servicio compartido como este:

 import { Injectable } from '@angular/core'; import { Platform } from 'ionic-angular'; @Injectable() export class SplitPaneData { splitPaneState: boolean; constructor(public platform: Platform) { this.splitPaneState = false; } setSplitPane(state: boolean) { if (this.platform.width() > 768) { this.splitPaneState = state; } else { this.splitPaneState = false; } } getSplitPane() { return this.splitPaneState; } }

Y en app.component use ese servicio para mostrarlo/ocultarlo:

 <ion-split-pane [when]="splitPaneData.getSplitPane()">

Si desea ocultarlo en una página determinada, puede utilizar los eventos de ciclo de vida ionViewWillEnter y ionViewWillLeave :

 ionViewWillEnter() { // Disable the split plane in this page this.splitPaneData.setSplitPane(false); } ionViewWillLeave() { // Enable it again when leaving the page this.splitPaneData.setSplitPane(true); }
over 4 years ago · Santiago Trujillo Report

0

actualizar iónico 5

trabaja para mí login.page.ts

 constructor( private api: LoginService, private loadCt: LoadingController, private nav : NavController, public menu : MenuController ) { this.menu.enable(false); this.menu.swipeGesture(false) } ionViewWillLeave(){ this.menu.enable(true); this.menu.swipeGesture(true); }
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!