Ionic 4 toggle menu delay

Hi!

I am having problems with the toggle menu of Ionic 4. It takes a delay between 1 and 2 seconds to open the side menu when I press the icon.

The menu is in the app.component and I’m using the following code to display the toggle in the app pages:

<ion-menu-toggle>
    <ion-button>
        <ion-icon slot="icon-only" name="menu"></ion-icon>
    </ion-button>
</ion-menu-toggle>

Am I doing something wrong, is there really a problem or what can I do to improve this time?
Maybe I should not call the toggle on every page or remove pages from the stack?
Thank you!

Node: 10.15.1
Angular: 7.3.3
Ionic: 4.10.3
Cordova: 8.1.2

I think you want to use ion-menu-button for the “hamburger” menu

You use the menu toggle in the actual menu itself to toggle it closed

Ion-menu-button docs

1 Like

Hi @jjdev
I changed all ion-menu-toggle to ion-menu-button, the code gets cleaner, thanks for this.
But the lag remains :frowning:

From what I noticed, it seems that lag / delay happens when I access a page that has a lot of items in ngFor. Empty or low content pages do not cause the delay problem.

Interesting. Could be a base angular issue relating to looping then