title: Enable ion-list of ion-menu after login
body: <p>I have to do something like that:
  when I click to the login, a page will appear and it verifies connection to database ( which is well done ), if success it will be redirected to homePage, the hidden ion-list(&lt;ion-list hidden  #menu2 &gt;) should appear in the menu.</p>
  <p><a href="https://i.stack.imgur.com/RLT2I.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RLT2I.png" alt="enter image description here" /></a></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Component } from '@angular/core';
  import { NavController,MenuController ,NavParams,AlertController,LoadingController,ViewController} from 'ionic-angular';
  import {Http} from "@angular/http";
  import 'rxjs/add/operator/map';
  import {HomePage} from '../home/home';
  import { MyService } from '../../providers/my-service';
  import { Storage } from '@ionic/storage';
  
  @Component({
    selector: 'page-modal-page',
    templateUrl: 'modal-page.html',
    providers: [MyService]
  })
  export class ModalPagePage {
    data:any;
  ftechdata:any;
   
    constructor(public navCtrl: NavController ,public viewCtrl:ViewController, private http:Http,private alert :AlertController,private loading:LoadingController) {
      this.data={};
      this.data.username="";
      this.data.password="";
       
    
    
    }
  
    ionViewDidLoad() {
      console.log('ionViewDidLoad LoginPage');
    }
  login(){
  let username=this.data.username;
  let password=this.data.password; 
  let data =JSON.stringify({username,password});
  let link="https://stationpfe.000webhostapp.com/login.php";
  this.http.post(link,data)
  .subscribe(data=&gt;{
  let loader=this.loading.create({
   content:"cheking! please wait...",
      duration:1000
    });
    loader.present();
    this.navCtrl.setRoot(HomePage);
    // 
    
    
  },error=&gt;{
  let alert =this.alert.create({
  title:'warning',
  subTitle:'wrong username or password !please try agin !',
  buttons:['Ok']
    });
    alert.present();
  });
     
  }
  
  close() {
      this.viewCtrl.dismiss(); // This works fine
    }
    showPopup(){
  console.log("action sur label ");
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ion-menu [content]="content" &gt;
    &lt;ion-header&gt;
      &lt;!--&gt; lec hangement de couleur pour la liste des items page app.html, app.scss&lt;--&gt;
      &lt;ion-toolbar color="danger"  &gt;
        &lt;ion-title &gt; MyApp &lt;/ion-title&gt;
      &lt;/ion-toolbar&gt;
    &lt;/ion-header&gt;
  
    &lt;ion-content  class="custom"&gt;
      &lt;ion-list &gt;
         &lt;ion-list-header&gt;
            Navigate
          &lt;/ion-list-header&gt;
        &lt;button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)" &gt;
         &lt;ion-icon  name="alarm"  item-left&gt; &lt;/ion-icon&gt;
           
          {{p.title}}
        &lt;/button&gt;
      &lt;/ion-list&gt;
  
      &lt;ion-list hidden  #menu2 &gt;
        &lt;ion-list-header&gt;
            Account
          &lt;/ion-list-header&gt; 
        &lt;button menuClose ion-item *ngFor="let p of pages1" (click)="openPage(p)" &gt;
         
          {{p.title}}
        &lt;/button&gt;
      &lt;/ion-list&gt;
  
    &lt;/ion-content&gt;
  
  &lt;/ion-menu&gt;
  
  &lt;!--  swipeBackEnabled="false"   Disable swipe-to-go-back because it's poor UX to combine STGB with side menus --&gt;
  &lt;ion-nav [root]="rootPage" #content &gt;&lt;/ion-nav&gt;</code></pre>
  </div>
  </div>
  </p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Component, ViewChild } from '@angular/core';
  import { Nav, Platform } from 'ionic-angular';
  import { StatusBar, Splashscreen } from 'ionic-native';
  
  import { TabsPage } from '../pages/tabs/tabs';
  
  import { SettingsPage } from '../pages/settings/settings';
  import { AccountPage } from '../pages/account/account';
  import { VoiturePage } from '../pages/voiture/voiture';
   import { LoginPage } from '../pages/login/login';
   import { TarifPage } from '../pages/tarif/tarif';
    import { HomePage } from '../pages/home/home';
    import { ModalPagePage } from '../pages/modal-page/modal-page';
    import { ListevoiturePage } from '../pages/listevoiture/listevoiture';
  
    import { InsertvoiturePage } from '../pages/insertvoiture/insertvoiture';
  
    
  @Component({
    templateUrl: 'app.html',
   providers: [ModalPagePage]
  })
  export class MyApp {
    @ViewChild(Nav) nav: Nav;
  
    rootPage = HomePage;
  
    pages: Array&lt;{title: string, component: any}&gt;;
   pages1: Array&lt;{title: string, component: any}&gt;;
    constructor(public platform: Platform) {
      this.initializeApp();
      
      
  this.pages = [
        { title: ' Home', component: TabsPage },
        { title: 'tickets' , component: TarifPage },
        { title: 'login', component: LoginPage },
      
      ];
      this.pages1 = [
        { title: 'liste Voiture', component: InsertvoiturePage},
       
        
        
      ];
      
      
      
       
  
    }
    openPage(page) {
      
      this.nav.setRoot(page.component);
     
  
     
    }
    
  
    initializeApp() {
      this.platform.ready().then(() =&gt; {
        // Okay, so the platform is ready and our plugins are available.
        // Here you can do any higher level native things you might need.
        StatusBar.styleDefault();
        Splashscreen.hide();
        
      });
    }
  }</code></pre>
  </div>
  </div>
  </p>