diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ab78376..45f8453 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -4,19 +4,22 @@ import { StatusBar } from '@ionic-native/status-bar'; import { SplashScreen } from '@ionic-native/splash-screen'; import { HomePage } from '../pages/home/home'; + @Component({ templateUrl: 'app.html' }) export class MyApp { - rootPage:any = HomePage; + rootPage: any = HomePage; + + constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen) { + } - constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) { - platform.ready().then(() => { + ionViewDidLoad() { + this.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(); + this.statusBar.styleDefault(); + this.splashScreen.hide(); }); } } -