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