title: Why we are not able to use Nav in constructor instead of @ViewChild(Nav) nav: Nav in ionic
body: <p>I am new to ionic,i am trying to understand below code.I can't understand what is the "NAV" for.why we use that NAV in @viewchild().I am able to access the MenuController by using it in constructor,and why not able to use that NAV in constructor.</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 { Platform, MenuController, Nav } from 'ionic-angular';
  
  import { HelloIonicPage } from '../pages/hello-ionic/hello-ionic';
  import { ListPage } from '../pages/list/list';
  
  import { StatusBar } from '@ionic-native/status-bar';
  import { SplashScreen } from '@ionic-native/splash-screen';
  
  
  @Component({
    templateUrl: 'app.html'
  })
  export class MyApp {
    @ViewChild(Nav) nav: Nav;
  
    // make HelloIonicPage the root (or first) page
    rootPage = HelloIonicPage;
    pages: Array&lt;{title: string, component: any}&gt;;
  
    constructor(
      public platform: Platform,
      public menu: MenuController,
      public statusBar: StatusBar,
      public splashScreen: SplashScreen
    ) {
      this.initializeApp();
  
      // set our app's pages
      this.pages = [
        { title: 'Hello Ionic', component: HelloIonicPage },
        { title: 'My First List', component: ListPage }
      ];
    }
  
    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.
        this.statusBar.styleDefault();
        this.splashScreen.hide();
      });
    }
  
    openPage(page) {
      // close the menu when clicking a link from the menu
      this.menu.close();
      // navigate to the new page if it is not the current page
      this.nav.setRoot(page.component);
    }
  }</code></pre>
  </div>
  </div>
  </p>