How to disable side menu in ionic 4?

#1

I am using,

this.menuCtrl.swipeEnable(false);

for ionic 3 app. This works fine for disabling the side menu. But, it doesn’t work for ionic 4! Below is my ionic 4 code sample:

#2

FYI: You forgot your code sample.

#3

What do you mean by this? I don’t understand!

#4

Where’s the code? Maybe you forgot to past the code here.

#5
constructor(public loginService: LoginService, private router: Router, public menuCtrl: MenuController, public loadingController: LoadingController) {
    this.menuCtrl.enable(false);
  }
<ion-app>
  <ion-split-pane>
    <ion-menu>
      <ion-header>
        <ion-toolbar>
          <ion-title>Menu</ion-title>
        </ion-toolbar>
      </ion-header>
      <ion-content>
        <ion-list>
          <ion-menu-toggle auto-hide="false" *ngFor="let p of appPages">
            <ion-item [routerDirection]="'root'" [routerLink]="[p.url]">
              <ion-icon slot="start" [name]="p.icon"></ion-icon>
              <ion-label>
                {{p.title}}
              </ion-label>
            </ion-item>
          </ion-menu-toggle>
        </ion-list>
      </ion-content>
    </ion-menu>
    <ion-router-outlet main></ion-router-outlet>
  </ion-split-pane>
</ion-app>
#6

Hello, please see my code.