Ionic-starter-sidemenu back


#1

I tried https://github.com/driftyco/ionic-starter-sidemenu
and the http://plnkr.co/edit/0RXSDB?p=preview
When starting, click for instance dubstep then you get playlist with back in top.
If you open the side menu, choose playlist and then click for instance dubstep,
there is no back in the top? Shouldnt the back also display ?


#2

Nope this is the expected behavior.
Please take a look at the docs for the menu-close attribute.

http://ionicframework.com/docs/api/directive/menuClose/


#3

strange… user doesnt have a clue what to do next, while at the same situation it does show what todo.
I dont understand the logic?


#4

So the logic is this.

Each item in the side menu drawer acts as a history reset.
So when you go to a view from the sidemenu, like Browse, Search,Playlists, the menu will not show a back button.

But if your on the playlists page, and navigate to say indie, the back button will show as expect.
But we also disable the sidemenu when you get to the indie page.
This is done so we can start to do things…like swipe to go back…(coming soon!)

http://ionicframework.com/docs/nightly/api/directive/ionSideMenus/


#5

Thnx for your answer… I understand the logic that you dont want to go back to sidemenu… Thats how it in most apps works. I talked about Sidemenu -> playlistS -> indie/playlist

Your codepen is working as aspected, The plunker is different… If you choose playlists via sidemenu and then playlistS: -> indie(playlisT) the back is not shown … Maybe the link from github to your codepen would be beter?

Swipe back would be great, (its a bit of logical you can swipe back to the previous page)
I already tried but it didn’t always respond… Hope yours will be beter :smile:

ion-content on-swipe-right=“swipe(‘right’)”

$scope.swipe = function (direction)
{ $ionicHistory.goBack();


#6

I’ve been trying the starter, this bug I believe is still unfixed or reappeared.
Good news is when trying nightly build of ionic bundle using:

<link href="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
<script src="//code.ionicframework.com/nightly/js/ionic.bundle.js">

The Ionic-starter-sidemenu will run as expected.
Though if I use ionic.bundle.js v1.0.1, bug will show.

There is also a post Sidemenu seed project drops back button during navigation talking about this. It seems a fix is already made, but reapeared on 1.0.1.