kolexinfos
kolexinfos

Reputation: 1002

Hide Ionic Menu Button Not Working

As there is no default implementation in the Ionic Framework for hiding the the menu(burger)button on the nav bar on a particular page(correct me if I am wrong) I tried an hack to hide it from a page I did this on the controller for the page

$scope.$on('$ionicView.afterEnter', function(){

        var element = document.querySelector("[menu-toggle=right]");
        element.style.display = "block";
        element.className = "";
        element.style.display = 'none';

    });

But it does not seem to work as the menu button still shows up on the nav bar, I have also tried doing this on the enter and beforeEnter events of the lifecycle of the page but not luck

Upvotes: 1

Views: 131

Answers (1)

ashfaq.p
ashfaq.p

Reputation: 5487

ion-view API provides hide-nav-bar option (boolean). This will hide the default nav-bar. You can use this to hide the default nav-bar and show your own implementation.

Upvotes: 0

Related Questions