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 87b97ff commit c93e625a228c37cc271bf606d2df77c97739b309
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/app/app.component.ts
View
@@ -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 c93e625

Please sign in to comment.