# Side menu close on phone back button press

**URL:** <https://forum.ionicframework.com/t/side-menu-close-on-phone-back-button-press/180745>\
**Category:** Ionic Angular\
**Created:** [January 2, 2020, 2:00pm UTC](https://forum.ionicframework.com/t/side-menu-close-on-phone-back-button-press/180745 "2020-01-02T14:00:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubhamappstec](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@shubhamappstec](https://forum.ionicframework.com/u/shubhamappstec)\
**Post date:** [January 2, 2020, 2:00pm UTC](https://forum.ionicframework.com/t/side-menu-close-on-phone-back-button-press/180745/1 "2020-01-02T14:00:16Z")

</div>

Hi,

I have sidemenu page and now after opening the side menu when i click on back button its going back instead of closing back side menu.  
help me…

---

<div class="post-metadata">

**Author:** ![shubhamappstec](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@shubhamappstec](https://forum.ionicframework.com/u/shubhamappstec)\
**Post date:** [January 2, 2020, 2:01pm UTC](https://forum.ionicframework.com/t/side-menu-close-on-phone-back-button-press/180745/2 "2020-01-02T14:01:43Z")

</div>

here is ionic info:

Ionic CLI : 5.4.13  
Ionic Framework : @ionic/angular 4.11.7  
@angular-devkit/build-angular : 0.801.3  
@angular-devkit/schematics : 8.1.3  
@angular/cli : 8.1.3  
@ionic/angular-toolkit : 2.1.1

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)  
Cordova Platforms : android 8.1.0  
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 4 other plugins)

Utility:

cordova-res : 0.8.1  
native-run : 0.3.0

System:

Android SDK Tools : 26.1.1  
NodeJS : v10.16.2  
npm : 6.9.0  
OS : Windows 10

---

<div class="post-metadata">

**Author:** ![cristsaavedra](https://avatars.discourse-cdn.com/v4/letter/c/e9bcb4/32.png) [@cristsaavedra](https://forum.ionicframework.com/u/cristsaavedra)\
**Post date:** [January 2, 2020, 2:06pm UTC](https://forum.ionicframework.com/t/side-menu-close-on-phone-back-button-press/180745/3 "2020-01-02T14:06:50Z")

</div>

If you need to do this, the first thing you should do is capture the event when you press the back button. Once this is done you should close the side menu by code. A few days ago place how it works and capture the backbutton for ionic 4 so you can go for a spin and try to implement it.

> [@How to access physical back button](https://forum.ionicframework.com/t/how-to-access-physical-back-button/180612/13):
>
> I’m glad it works for you now. I was doing just the test code to upload it to git and you will try it. Here is 08:30 am GTM 03:00 Chile. Good luck and have a happy year. don’t forget to put your code on how you made it work so that it can serve others and mark your answer as a solution.

if you have any questions with this or with the implementation try to place your code so we can guide you

---

<div class="post-metadata">

**Author:** ![shubhamappstec](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@shubhamappstec](https://forum.ionicframework.com/u/shubhamappstec)\
**Post date:** [January 5, 2020, 5:42am UTC](https://forum.ionicframework.com/t/side-menu-close-on-phone-back-button-press/180745/4 "2020-01-05T05:42:37Z")

</div>

Hi,  
Thanks for your response. how i detect sidemenu is open or close from home.page.ts?
