-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Navigation issue in sidemenu starter project #4038
Comments
It seems this issue is actual in some newer versions of Ionic, but I also found this doesn't happen in v1.0.0-beta.14 |
I also found this bug, and I temporarily add this for bugfix: angular.module('starter.controllers', []) |
Thanks for your response, @gotojmp. It worked. However, I am actually planning create a pretty complicated project. I am afraid this hack will cause some unexpected troubles in my project. Is there any other official fixes or releases for this? |
I have same bug in my production project. Problem in menuClose. When you click on menu, nextViewOptions historyRoot set true.
|
If in your project menu-close with href, like in ionic-starter-sidemenu IonicModule
.directive('menuClose', ['$ionicHistory', function($ionicHistory) {
return {
restrict: 'AC',
link: function($scope, $element, $attr) { // <--- add $attr
$element.bind('click', function() {
var sideMenuCtrl = $element.inheritedData('$ionSideMenusController');
if (sideMenuCtrl) {
var currentView = $ionicHistory.currentView(); // <--- add line
var currentViewUrl = "#" + currentView.url; // <--- add line
if( $attr.href !== currentViewUrl ) { // <--- add line
$ionicHistory.nextViewOptions({
historyRoot: true,
disableAnimate: true,
expire: 300
});
} // <--- add line
sideMenuCtrl.close();
}
});
}
};
}]); But this check href of current view, will not fix Another solution replace menu-close with menu-toggle |
Closing as a duplicate of #4132 |
Type: bug
Platform: all
I am using the latest version of Ionic (v1.0.1) to create a sidemenu starter project. Unfortunately I found an annoying issue in this "standard" template.
Create a sidemenu starter project
$ ionic start myApp sidemenu
Run this project. You will see Playlists page by default. Please don't do anything... just open side menu by swiping.
Tap on Playlists from side menu. (I know Playlists was opened already) Side menu disappears and Playlists page will appear again.
Tap on any item, for example, Dubstep.
You will be redirected to single playlist page. But you won't see Back button in navigation bar, as if navigation history was cleared. In this case, Back button should appear because new page (Dubstep) is pushed to navigation stack.
Navigation system and back button works well when Playlists page is opened only once via side menu. Issue happens when you access this page twice. (continuously)
I cannot actually believe this standard / well-known seed project includes such a stupid issue. And it's actually killing me.
The text was updated successfully, but these errors were encountered: