Ionic v4 how to fire menu event

Hello everyone,

I’m kinda new in Angular and ionic 4 and have propably a small problem, i want to detect event fire on menu open and close.

On ionic documentation i found this events:

ionDidClose
ionDidOpen

But how to use that?

I already tryied to run it like that: (ionOpen)=“menuOpened()” (ionClose)=“menuClosed()” and inside app.component.ts i add this 2 functions with console.logs under constructor, but nothing happend when i open and close menu.

You can use ion-menu, ion-menu-controller or MenuController if you want a more programmatically approach.

With the last one you can create a button, manage the menu’s toggle function from there and apply any function you want. Also, with this function you can simply check if the menu is enabled or not.