How to disable side menu in ionic 4?


I am using,


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:


FYI: You forgot your code sample.


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


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

constructor(public loginService: LoginService, private router: Router, public menuCtrl: MenuController, public loadingController: LoadingController) {
          <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-router-outlet main></ion-router-outlet>

Hello, please see my code.