Click for button inside ion-toolbar not working

         <ion-menu [content]="content"  type="overlay">
  	<ion-toolbar color="primary">
	    <ion-buttons  left  (click)="resetMenu()">
	      <ion-icon name="arrow-back"></ion-icon>
	    </ion-buttons>

   		 <ion-title> Category </ion-title>
	   
 	 </ion-toolbar>

<ion-content> 	 
</ion-content>

This is my code.I have written a click function (click)=“resetMenu()”.But the click event is not working.click doesnot triggers the resetMenu()

Could you define “wha’t is not working”? Do you have an error? What’s the stacktray?

Quick note: In your code, ion-menu element is not closed

click event is not working

It’s because you don’t have a button inside ion-buttons I guess

<ion-menu [content]="content"  type="overlay">
<ion-toolbar color="primary">
    <ion-buttons left>
            <button ion-button ion-only (click)="resetMenu()">
           <ion-icon name="arrow-back"></ion-icon>
            </button>
    </ion-buttons>

	 <ion-title> Category </ion-title>
   
 </ion-toolbar>
    </ion-menu>

It works.My mistake :yum:.Thanks :slight_smile:

2 Likes

Thanks, it’s work…