Files
Echo/echo-mobile-app/echo/src/app/app.component.ts
2020-07-06 23:41:26 +02:00

36 lines
887 B
TypeScript

import { Component } from '@angular/core';
import { Platform } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { ControllerService } from './services/controller.service';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['app.component.scss']
})
export class AppComponent {
constructor(
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private controllerService: ControllerService
) {
this.initializeApp();
}
initializeApp() {
this.platform.ready().then(() => {
// Gather main data
this.controllerService.updateAllData()
.then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
})
});
}
}