angularjs - How to hide the menu icon when back button is shown? -


i have side menu with:

<ion-side-menus enable-menu-with-back-views="true"> 

so accesable each view of app. when there view have icon , menu icon in top left nav-bar. how can disable menu-icon when there back-icon?

the method here:

$scope.$on('$ionicview.beforeenter', function (e, data) {     if (data.enableback) {         $scope.$root.showmenuicon = false;     } else {         $scope.$root.showmenuicon = true;     } }); 

is not working! because never called! maybe $ionicview.beforeenter not exist anymore? @ least never fired.

i solved problem code in each view controller

$scope.$on('$ionicview.beforeenter', function () {     $ionicsidemenudelegate.candragcontent(false); }); $scope.$on('$ionicview.leave', function () {     $ionicsidemenudelegate.candragcontent(true); }); 

hope helps

don't forget add $ionicsidemenudelegate controller


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -