# \[solved\] Go Back to previous view when user clicks on menu-element

**URL:** <https://forum.ionicframework.com/t/solved-go-back-to-previous-view-when-user-clicks-on-menu-element/62193>\
**Category:** ionic-v1\
**Created:** [August 31, 2016, 3:20pm UTC](https://forum.ionicframework.com/t/solved-go-back-to-previous-view-when-user-clicks-on-menu-element/62193 "2016-08-31T15:20:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_Wallace](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/william_wallace/32/131850_2.png) [@William\_Wallace](https://forum.ionicframework.com/u/William_Wallace)\
**Post date:** [August 31, 2016, 3:20pm UTC](https://forum.ionicframework.com/t/solved-go-back-to-previous-view-when-user-clicks-on-menu-element/62193/1 "2016-08-31T15:20:38Z")

</div>

Hello together,  
this time I have a specific questions for the ionicHistory and the go-Back possibility.

What I want to do:

- I have multiple views (Start, Infos, …). Inside those views are links to other views (with ui-sref). When I click on such an “inside”-link I get an back Button.

Now my special case:

- When I am in such an inside-view and open the menu, and click on a menu-element. I get to the next view, but there is no back button shown.

I know, that is caused bei the ui-sref and the ionicHistory-Stack. So I log the IonicHistory-Stack via viewHistory() and there is noch backView or something after the special case.

Does anybody has an idea how I can get that working?

I already find this here: [How can I use $ionicHistory to go back 2 views?](https://forum.ionicframework.com/t/how-can-i-use-ionichistory-to-go-back-2-views/16176). But that wont work, because the view is not in the backView of the viewHistory-object.

Thanks for every suggestion.

My menu is build like this:

```
    <ion-item menu-close ui-sref="app.infos">
      <i class="iconion-ios-home"></i>
    </ion-item>
```

---

<div class="post-metadata">

**Author:** ![William\_Wallace](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/william_wallace/32/131850_2.png) [@William\_Wallace](https://forum.ionicframework.com/u/William_Wallace)\
**Post date:** [September 1, 2016, 10:45am UTC](https://forum.ionicframework.com/t/solved-go-back-to-previous-view-when-user-clicks-on-menu-element/62193/2 "2016-09-01T10:45:11Z")

</div>

OK, for anybody who has the same issue. It is not a bug it is a feature.

The menu-close attribute resets the history. Something like that could help, but anyway this case is closed for me:

> [@Any way to -not- reset history stack on menu-close?](https://forum.ionicframework.com/t/any-way-to-not-reset-history-stack-on-menu-close/16340/):
>
> Is there a way to create links in the side menu that act as sub-pages to the root page, instead of each link becoming root pages themselves? I would like each of my pages to have a back button as needed, and no pages being viewed from the side-menu are getting one. I’m aware that the menu-close directive causes the history stack to be reset due to a UI best practice guideline, and it seems I would like to go directly against that. I’ve tried using menu-toggle in place of menu-close, but that ca…
