title: New to Ionic: Typescript Error in App.Component.Ts
body: <p>I am getting a TypeScript Error in my Ionic app. I have a sidemenu app, and was separating the menu into it's own component so that I could add a login page more easily. I have been following this guide to do so: <a href="http://roblouie.com/article/344/ionic-2-hide-menu-or-tabs-for-login-screen/" rel="nofollow noreferrer">http://roblouie.com/article/344/ionic-2-hide-menu-or-tabs-for-login-screen/</a></p>
  
  <p>In my new app.component.ts I have the following code:</p>
  
  <pre><code>import { Component, ViewChild } from '@angular/core';
  import { Nav, Platform } from 'ionic-angular';
  import { StatusBar } from '@ionic-native/status-bar';
  import { SplashScreen } from '@ionic-native/splash-screen';
  
  import { MenuComponent } from "./menu.component";
  
  @Component({
    template: '&lt;ion-nav #baseNav&gt;&lt;/ion-nav&gt;'
  })
  export class MyApp {
    @ViewChild('baseNav') nav: Nav;
  
    constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen) {
      this.initializeApp();
    }
  
    ngOnInit() {
      this.nav.push(MenuComponent, { animate: false });
    }
  
    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>
  
  <p>I am fairly new with Ionic and I have been mostly following guides to get started. Any advice on the matter would be greatly appreciated. Here is the error message I am getting: </p>
  
  <p><a href="https://i.stack.imgur.com/0SV36.png" rel="nofollow noreferrer">Error Message</a></p>
  
  <p><a href="https://i.stack.imgur.com/0SV36.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0SV36.png" alt="enter image description here"></a></p>