Ionic - How to remove sidemenu on login page only?

前端 未结 17 2853
北海茫月
北海茫月 2020-12-08 09:25

I need to remove sidemenu only on my login page. Otherwise remain. How it can be done? I\'m using command ionic ionic start myApp sidemenu to create the project

17条回答
  •  伪装坚强ぢ
    2020-12-08 10:07

    you can also add this to your main app controller:

    $scope.$root.enableLeft = true;
    $scope.$root.showMenuIcon = true;
    

    and simply switch it to false in every controller you dont want your side menu appear in:

    $scope.$root.enableLeft = false;
    $scope.$root.showMenuIcon = false;
    

    add is-enabled="$root.enableLeft" to your html tag and ng-show="$root.showMenuIcon" to the button inside html tag.

提交回复
热议问题