Skip to content

Commit

Permalink
Step 7.15: Add user identification in app's main component
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and DAB0mB committed Mar 23, 2017
1 parent 35369e1 commit d26653f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/app.component.ts
Expand Up @@ -2,14 +2,18 @@ import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar, Splashscreen } from 'ionic-native';
import { ChatsPage } from '../pages/chats/chats';
import { Meteor } from 'meteor/meteor';
import { LoginPage } from '../pages/login/login';

@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage = ChatsPage;
rootPage: any;

constructor(platform: Platform) {
this.rootPage = Meteor.user() ? ChatsPage : LoginPage;

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 d26653f

Please sign in to comment.