Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

Ionic PWA | Hide menu only on login page

$
0
0

@JEricaM wrote:

Hi, I’m developing a pwa with ionic using the Pwa Ionic Starter.
Which is the best method to disable the sidemenu on login page and enable in all the other pages?
I’m approach is:

note: noMenu it’s a prop of each page and in app-login values true

@Listen("ionRouteDidChange")
  pageNameChange() {
    this.noMenu = this.el.querySelector("ion-router-outlet > *").hasAttribute("no-menu");
    let menuToggle;
    if(this.noMenu == true){
      menuToggle = document.querySelector('ion-menu') as HTMLElement;
      menuToggle.disabled = true;
    } else {
      menuToggle = document.querySelector('ion-menu') as HTMLElement;
      menuToggle.disabled = false;
    }
  }

Thank you

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>