# Android back button ion-side-menus

**URL:** <https://forum.ionicframework.com/t/android-back-button-ion-side-menus/34853>\
**Category:** ionic-v1\
**Created:** [October 16, 2015, 12:28pm UTC](https://forum.ionicframework.com/t/android-back-button-ion-side-menus/34853 "2015-10-16T12:28:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![szulborski](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@szulborski](https://forum.ionicframework.com/u/szulborski)\
**Post date:** [October 16, 2015, 12:28pm UTC](https://forum.ionicframework.com/t/android-back-button-ion-side-menus/34853/1 "2015-10-16T12:28:57Z")

</div>

Hi

I’m working on ionic application that will be used on android and ios devices. I’m using ion-side-menus.  
This is my home screen html code:

```
<ion-side-menus>
    <ion-side-menu-content>
        <ion-content>
            <div ng-repeat="category in categories" ng-click="display_pages($index)" class="category">
                {{ category.name }}
            </div>
        </ion-content>
    </ion-side-menu-content>
    <ion-side-menu side="left">
        <ion-list>
            <ion-item ng-repeat="page in pages" menu-close>
                <a href="" ui-sref="page({ id: page.id })">{{ page.name }}</a>
            </ion-item>
        </ion-list>
    </ion-side-menu>
</ion-side-menus>

```

When someone clicks on home screen div - menu opens. There are links to another pages in the menu. When someone clicks on that link - new page opens.  
Ewerithing seems to work perfectly despite the fact that on android devices system back button doesn’t work. When user is on the subpage and presses back button - application returns to system.  
Everything works ok when i remove ion-side-menus and display links without it. But i have to use this kind of menu…  
Somebody can help me? What i’m doing wrong?

---

<div class="post-metadata">

**Author:** ![jwt02180](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@jwt02180](https://forum.ionicframework.com/u/jwt02180)\
**Post date:** [October 16, 2015, 1:39pm UTC](https://forum.ionicframework.com/t/android-back-button-ion-side-menus/34853/2 "2015-10-16T13:39:58Z")

</div>

The `menu-close` attribute clears the history. Try replacing it with `menu-toggle="left"`

---

<div class="post-metadata">

**Author:** ![szulborski](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@szulborski](https://forum.ionicframework.com/u/szulborski)\
**Post date:** [October 16, 2015, 4:50pm UTC](https://forum.ionicframework.com/t/android-back-button-ion-side-menus/34853/3 "2015-10-16T16:50:14Z")

</div>

Hm. Nothing has changed… Even if I removed it, back button closes application.

I changed the code to:

**home.html:**

```
<ion-side-menus>
    <ion-side-menu-content>
        <ion-content>

            <a href="" ui-sref="chat">chat</a>

        </ion-content>
    </ion-side-menu-content>
    <ion-side-menu side="left">

    </ion-side-menu>
</ion-side-menus>

```

**index.html:**

```
<html>
    <head>
       ....
    </head>
    <body ng-app="pokis">
        <ion-nav-view></ion-nav-view>
    </body>
</html>

```

**app.js:**

```
.state('home', {
    cache: false,
    url: '/',
    templateUrl: 'home.html',
})

.state('chat', {
    cache: false,
    url: '/chat',
    templateUrl: 'chat.html',
})

```

I think this is super simple now. Chat page is empty, without ion-side-menus or even any other html code.

I open the app. I click on chat link and I get empty page. When i click back button - application closes. When i removed ion-side-menus and in home.htm there was only a tag - everything is ok.
