title: disable menu on login page ionic 4
body: <p>I use the beta of ionic 4 for the first time.
  I try to disable the menu on a login page, but i have some trouble.</p>
  
  <p>I've created the app with ionic-cli and the sidemenu template, then I generated a login page.</p>
  
  <p>I removed the <code>&lt;ion-split-pane&gt;</code> from the app.component.html</p>
  
  <p>I modified the app-routing.module.ts to redirect to my login screen.
  In my login file, I tried to put an ngOnInit event to disable the menu on this specific page</p>
  
  <pre><code>import { Component, OnInit, AfterContentInit, AfterViewInit,OnDestroy } from '@angular/core';
  import { MenuController } from '@ionic/angular';
  @Component({
    selector: 'app-login',
    templateUrl: './login.page.html',
    styleUrls: ['./login.page.scss'],
  })
  export class LoginPage implements OnInit, AfterContentInit, AfterViewInit,OnDestroy {
    constructor(public menuCtrl: MenuController) {}
    ngOnInit() {
      this.menuCtrl.enable(false);
      this.menuCtrl.swipeEnable(false);
    }
    ngAfterContentInit()  {
      this.menuCtrl.enable(false);
      this.menuCtrl.swipeEnable(false);
    }
    ngAfterViewInit() {
      this.menuCtrl.enable(false);
      this.menuCtrl.swipeEnable(false);
    }
    ngOnDestroy() {
      this.menuCtrl.enable(true);
      this.menuCtrl.swipeEnable(true);
    }
  }
  </code></pre>
  
  <p>I alto tried with an id set in ion-menu</p>
  
  <pre><code>&lt;ion-menu swipeEnabled="true" #menu&gt;
  </code></pre>
  
  <p>and change my code with     </p>
  
  <pre><code>this.menuCtrl.enable(false, 'menu');
  </code></pre>
  
  <p>It's not working, can some one help me please.</p>
  
  <p>Thank's</p>