The "back" button missing bug still exist?


#1

I have the problem with “back” button missing on some page that I revisit.

I can see that the “back” button appear for a split second and then missing. And the page have no more back history.

Why is that? Can’t seem to find a clear fix. Is it not everyone having the same issue? Please help, thanks.

I have the same problem:

and

https://calendee.com/2015/01/19/losing-your-ionic-framework-back-button/


#2

Which starter template did you use?

-> http://robferguson.org/2015/01/07/ionics-sidemenu-template-and-nested-states/

Can you post a CodePen?

E.g.:


#3

I have same issue with version 1.0.1

Here is code pen demo. http://codepen.io/anon/pen/wamRVX

Sequence to reproduce

  1. Select Check in from side menu.
  2. Click on Attendees on main page new page will display back button
  3. Click back which will return to Check in page
  4. Now select check in from side menu (Even if same page is open)
  5. Click on Attendees link new page will not display Back button

#4

I have the exact problem as @kamleshkoringa. You can refer to his Codepen.

I use ‘sidemenu’ as project template.

Any advice? Please help, thanks.


#5

The Ionic framework uses the Angular UI router for handling routes and defining states (see: http://robferguson.org/2015/07/19/using-ui-router-for-handling-routes-defining-states-and-sharing-data-between-views/).

So, you should use ‘ui-sref’ in your templates and ‘$state.go()’ in your controllers.

For example:

 <a ui-sref="eventmenu.checkin" class="item" menu-close>Check-in</a>

#6

robinyo

Thanks for your suggestion. I have changed code pen demo as per your suggestion but current issue still there. This issue is occurred only in version 1.0.1. before that it was working fine. It seems that menu-close attributes removes current state from history.


#7

But, you can swipe left to display the side menu when there is no ‘< Event Check-in’, which you cannot do when it is displayed …


#8

@lesliechw
@kamleshkoringa
@lesliechw

See: Back button missing sometimes

Re:

Its a BUG :frowning:

See this fork of your Plunker: http://plnkr.co/edit/JVvifeOX5VSDGoa8lrTJ?p=preview

I updated the Plunker to use 1-0-1 (1.0.1 “vanadium-vaquita” released!) which didn’t work so I checked my bower.json and noticed that I am still using:

"ionic": "v1.0.0-rc.3"

which works, index.html:

<link rel="stylesheet" href="http://code.ionicframework.com/1.0.0-rc.3/css/ionic.css" />
<link rel="stylesheet" href="style.css" />
<script src="http://code.ionicframework.com/1.0.0-rc.3/js/ionic.bundle.js"></script>

Note: I also updated from href to ui-sref in several files + fixed ‘menu.html’ as well :slight_smile:

Raised as issue 4132: https://github.com/driftyco/ionic/issues/4132