initial push
This commit is contained in:
35
echo-mobile-app/echo/src/app/app.component.ts
Normal file
35
echo-mobile-app/echo/src/app/app.component.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
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();
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user