How to restrict menu bar by swipe in ionic 6

I want to restrict menu-bar on login screen and some other screen. Menu bar disable property only works for hamburger but it still showing at the time of back-swipe.

I am using Ionic 6 and angular 13.

Can anyone please help?

Here is my app.component.html

<ion-split-pane contentId="main-content" *ngIf="this.platform.is('android') || this.platform.is('ios')">

  <ion-menu contentId="main-content" type="overlay" side="start">

    <ion-content>

      <ion-list id="inbox-list">
        <!-- <ion-list-header>Menu Content</ion-list-header> -->
        <ion-list-header class="manualHeaderFooter" *ngIf="this.platform.is('android') || this.platform.is('ios')" >
          <ion-toolbar class="manualHeaderFooter">
            <p class="title"> CKD Menu bar </p>
          </ion-toolbar>
        </ion-list-header>
        <ion-note></ion-note>

        <ion-menu-toggle auto-hide="false" *ngFor="let p of appPages; let i = index">
          <ion-item (click)="selectedIndex = i" routerDirection="root" [routerLink]="[p.url]" lines="solid"
            detail="false" [class.selected]="selectedIndex == i">
            <ion-icon slot="start" [ios]="p.icon + '-outline'" [md]="p.icon + '-sharp'"></ion-icon>
            <ion-label>{{ p.title }}</ion-label>
          </ion-item>
        </ion-menu-toggle>

      <ion-menu-toggle>
        <ion-item (click)="profile()"  routerDirection="root">
          <ion-icon name="person-circle-outline"></ion-icon>
          <ion-list-header class="listHeader">Profile</ion-list-header>
        </ion-item>
      </ion-menu-toggle>


        <ion-item>
          <ion-toggle color="dark" [(ngModel)]="isToggled" (ionChange)="enableDarkTheme()" style="padding-left: 0px;"></ion-toggle>
          <ion-label class="listToggle">Themes</ion-label>
        </ion-item>

      <ion-menu-toggle>
        <ion-item (click)="resetPasswordScreen()">
          <ion-icon name="lock-open"></ion-icon>
          <ion-list-header class="listHeader">Reset Password</ion-list-header>
        </ion-item>
      </ion-menu-toggle>

      <ion-menu-toggle>
        <ion-item (click)="moveTnC()">
          <ion-icon name="reader-outline"></ion-icon>
          <ion-list-header class="listHeader">Terms and conditions</ion-list-header>
        </ion-item>
      </ion-menu-toggle>

      <ion-menu-toggle>
        <ion-item (click)="movePrivacy()">
          <ion-icon name="shield-checkmark-sharp"></ion-icon>
          <ion-list-header class="listHeader">Privacy</ion-list-header>
        </ion-item>
      </ion-menu-toggle>

      <ion-menu-toggle>
        <ion-item (click)="moveToLogin()" routerDirection="root">
          <ion-icon name="power"></ion-icon>
          <ion-list-header class="listHeader">Log out</ion-list-header>
        </ion-item>
      </ion-menu-toggle>

        <ion-item>
          <ion-list-header  style="text-align:center; color:gray;">App Version:{{app_version}}</ion-list-header>
        </ion-item>

      </ion-list>

      <!-- <ion-list id="labels-list">
        <ion-item *ngFor="let label of labels" lines="none">
          <ion-icon slot="start" ios="bookmark-outline" md="bookmark-sharp"></ion-icon>
          <ion-label>{{ label }}</ion-label>
        </ion-item>
      </ion-list> -->

    </ion-content>

  </ion-menu>

  <ion-router-outlet id="main-content"></ion-router-outlet>

</ion-split-pane>

and Here is my app.component.ts

import { Component, OnDestroy, OnInit, ViewChild } from ‘@angular/core’;
import { ActivatedRoute, NavigationExtras, Router } from ‘@angular/router’;
import { AppVersion } from ‘@ionic-native/app-version/ngx’;
import { SplashScreen } from ‘@ionic-native/splash-screen/ngx’;
import { StatusBar } from ‘@ionic-native/status-bar/ngx’;
import { IonicModule, Platform } from ‘@ionic/angular’;
import { ThemesService } from ‘./service/themes.service’;
import { fromEvent, Observable, Subscription } from ‘rxjs’;

@Component({
selector: ‘app-root’,
templateUrl: ‘app.component.html’,
styleUrls: [‘app.component.scss’],
})
export class AppComponent implements OnDestroy, OnInit {

ID: any;
currentPageTitle = ‘Dashboard’;

appPages = [
{
title: ‘Dashboard’,
url: ‘/dashboard’,
icon: ‘easel’
}
// {
// title: ‘Reset Password’,
// url: ‘/reset-password’,
// icon: ‘lock-open’
// },
// {
// title: ‘Profile’,
// url: ‘/profile/:ID’,
// ID: this.profile(),
// icon: ‘person’,
// },
// {
// title: ‘Log out’,
// url: ‘/login’,
// icon: ‘power’
// }
];
public isToggled: boolean;
protected app_version: string;

onlineEvent: Observable;
offlineEvent: Observable;
subscriptions: Subscription = ;

connectionStatusMessage: string;
connectionStatus: string;
showComponent: boolean;

constructor(private platform : Platform,private splashScreen: SplashScreen,private statusBar: StatusBar,
private route: ActivatedRoute,private router:Router, private themesService: ThemesService,
private appVersion: AppVersion) {
this.initializeApp();

  this.appVersion.getVersionNumber().then(
    (versionNumber) => {
      this.app_version = versionNumber;
      console.log("app_version is :::"+this.app_version)
    },
    (error) => {
      console.log(error);
    });

    // if (this.router.url === '/login') {
    //   this.showComponent = false;
    // }

    IonicModule.forRoot({
      swipeBackEnabled: false
  }),

this.isToggled = false;

this.route.queryParams.subscribe(params => {
  console.log("params Dashboard:::::::" + JSON.stringify(params));

  if (params["ID"] !== undefined ) {

    this.ID = params["ID"];
    console.log(" id Dashboard:::::::" + this.ID ) ;

  }
  else{
    console.log("else");
  }
});

}

// @ViewChild(IonRouterOutlet, { static : true }) routerOutlet: IonRouterOutlet;

// ionViewDidEnter() {
// this.menu.swipeEnable(false);

// // If you have more than one side menu, use the id like below
// // this.menu.swipeEnable(false, ‘menu1’);
// }

// ngOnInit() : void {
// // this.routerOutlet.swipeGesture = false;
// this.routerOutlet.canGoBack();
// }

ngOnInit(){
/**
* Get the online/offline status from browser window
*/
this.onlineEvent = fromEvent(window, ‘online’);
this.offlineEvent = fromEvent(window, ‘offline’);

this.subscriptions.push(this.onlineEvent.subscribe(e => {
  this.connectionStatusMessage = 'Back to online';
  this.connectionStatus = 'online';
  console.log('Online...');
}));

this.subscriptions.push(this.offlineEvent.subscribe(e => {
  this.connectionStatusMessage = 'Connection lost! You are not connected to internet';
  this.connectionStatus = 'offline';
  console.log('Offline...');
}));

}

ngOnDestroy(){
/**
* Unsubscribe all subscriptions to avoid memory leak
*/
this.subscriptions.forEach(subscription => subscription.unsubscribe());
}

async initializeApp(): Promise {
await this.platform.ready();

this.platform.backButton.subscribeWithPriority(1, () => { // to disable hardware back button on whole app
});

this.platform.ready().then(() => {
  this.statusBar.styleDefault();
  this.splashScreen.hide();
});

}

profile(){
let navigationExtras: NavigationExtras = {
queryParams: {
‘ID’ : this.ID,
}
};
// this.router.navigate([‘/professional-details’],navigationExtras);
this.router.navigate([‘/profile’],navigationExtras);
// this.router.navigateByUrl(‘/profile’);
}

enableDarkTheme()
{

console.log("Toggled: "+ this.isToggled); 

if (this.isToggled == true){

this.themesService.enableDark();
} else {

  this.themesService.enableLight();
}

}

resetPasswordScreen() {
this.router.navigateByUrl(‘/reset-password’);
}

movePrivacy() {
this.router.navigateByUrl(‘/ckd-privacy’);
}

moveTnC() {
this.router.navigateByUrl(‘/terms-and-conditions’);
}

moveToLogin() {
this.router.navigateByUrl(‘/login’);
}

}