disable menu on login page ionic 4
Ionic 4 you would use the disabled property on ion-menu to hide on login.
<ion-menu [disabled]="!isLoggedIn"></ion-menu>
Ionic 6 still supports ionViewWillEnter
, use below code:
ionViewWillEnter() {
this.menuCtrl.enable(false);
}
You can find full example here.
In my case in ionic 4 app, I did the following in welcome.page.ts file. welcome.page.ts is the page in which I want to hide split pane.
import { MenuController } from '@ionic/angular';
constructor( public menuCtrl: MenuController){}
ionViewWillEnter() {
this.menuCtrl.enable(false);
}