How to capture menu API output events?

According to the documentation at the menu has Output events.

How do I react to those events?

I thought I would be able to do this:

<button ion-button menuToggle (click)="toggleMenu($event)" (ionOpen)="toggleMenu($event)">
  <ion-icon name="menu"></ion-icon>

but it doesnt work?

The click event is handled but the other doesnt come through?

Can a mod please close this.

The solution, thanks to @nakulgulati on the Ionic Slack channel for the help, was to add subscribe to the observable on the menu controller like this:

    //Do your stuff here.

Obviously, you need include and instantiate the menu controller in the project.


Thank you for posting this! I couldn’t find how to listen for an event anywhere in the documentation.