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

Menu is disabled after using setRoot() or push page in ionic3?

$
0
0

@RomnEmpire wrote:

Hi team,
I have added sidemenu in my app but problem after login menu button not visible in the html section but after refresh page its working.

I have create common component for header and put header in inside the page.please chek below code :

//Toggle for home page
 <ion-header> 
  <custom-header></custom-header>
    <div col-2 class="menu_container">
        <button ion-button menuToggle>
             <ion-icon name="menu"></ion-icon>
       </button> 
    </div>
</ion-header>

//app.html
 <ion-menu [content]="content" id="menu-avatar">
  <ion-content  class="side_menu">
     <div tappable #header class="user_wrap_detail">
      <ion-row>
        <ion-col>
          <img class="user-avatar round" [src]="currentUserObject.photo"/>

        </ion-col>
      </ion-row>
    </div>
    <ion-list no-lines margin-top> 
        <button tappable menuClose *ngFor="let p of pages" 
          [class.highlight]="p.active" (click)="openPage(p)"> 
          <div id="sideMenuText">   
             {{p.title | translate}}
          </div>
        </button>
    </ion-list>
  </ion-content>
</ion-menu>

Tried Solution:

  1. During push i have enable menu to true;
    this.menuCtrl.isEnabled()
  2. this.appCtrl.getRootNavs()[0].push(SecondPage);

tell me above how to fix above issue?

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>