Skip to content

Commit

Permalink
Configure app component
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvltn committed Feb 10, 2018
1 parent be91052 commit 099d69d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
29 changes: 18 additions & 11 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,28 @@ import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Task } from '../models/Task';

import { HomePage } from '../pages/home/home';
@Component({
templateUrl: 'app.html'
templateUrl: 'app.html'
})
export class MyApp {
rootPage:any = HomePage;
rootPage;

constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
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.
statusBar.styleDefault();
splashScreen.hide();
});
}
constructor(
platform: Platform,
statusBar: StatusBar,
splashScreen: SplashScreen,
) {
platform.ready().then(() => {
statusBar.styleDefault()

Promise.all([
Task.prepare()
])
.then(() => this.rootPage = 'tasks')
.then(() => splashScreen.hide())
})
}
}

2 changes: 1 addition & 1 deletion src/app/app.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<ion-nav [root]="rootPage"></ion-nav>
<ion-nav *ngIf="rootPage" [root]="rootPage"></ion-nav>

0 comments on commit 099d69d

Please sign in to comment.