Skip to content

Commit

Permalink
Step 5.13: Add user identifiation in app's main component
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha committed Nov 28, 2016
1 parent 4d726fb commit 0ac1b3d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions 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: `<ion-nav [root]="rootPage"></ion-nav>`
})
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.
Expand Down

0 comments on commit 0ac1b3d

Please sign in to comment.