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 darkbasic committed Oct 16, 2017
1 parent 7e153ee commit afd7cd0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/app.component.ts
Expand Up @@ -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.
Expand Down

0 comments on commit afd7cd0

Please sign in to comment.