Skip to content
Permalink
Browse files

Step 7.15: Add user identification in app's main component

  • Loading branch information...
dotansimha authored and darkbasic committed Jan 24, 2017
1 parent 7e153ee commit afd7cd09fb2be9519d83f9c69111b25609da60a8
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/app/app.component.ts
@@ -3,14 +3,18 @@ import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
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:any = ChatsPage;
rootPage: any;

constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
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.

0 comments on commit afd7cd0

Please sign in to comment.
You can’t perform that action at this time.