diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 218886a82..14102be54 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,17 +1,20 @@ import { Component } from '@angular/core'; import { Platform } from 'ionic-angular'; import { StatusBar, Splashscreen } from 'ionic-native'; - import { TabsPage } from '../pages/tabs/tabs'; +import { LoginComponent } from '../pages/auth/login'; +declare let Meteor; @Component({ template: `` }) export class MyApp { - rootPage = TabsPage; + rootPage: any; constructor(platform: Platform) { + this.rootPage = Meteor.user() ? TabsPage : LoginComponent; + platform.ready().then(() => { // Okay, so the platform is ready and our plugins are available. // Here you can do any higher level native things you might need.